1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-24 10:39:44 +01:00

Merge pull request #1127 from Frontear/fix-apple-t2-ifd

apple-t2: remove ifd and cleanup drv
This commit is contained in:
Jörg Thalheim 2024-09-18 11:01:05 +02:00 committed by GitHub
commit 270ddd7512
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1996 additions and 52 deletions

View file

@ -24,7 +24,7 @@ let
pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/";
tiny-dfrPackage = pkgs.callPackage ./pkgs/tiny-dfr.nix { };
tiny-dfrPackage = pkgs.callPackage ./pkgs/tiny-dfr { };
apple-set-os-loader-installer = pkgs.stdenv.mkDerivation {
name = "apple-set-os-loader-installer-1.0";

View file

@ -1,51 +0,0 @@
{ pkgs, fetchFromGitHub, rustPlatform, ... }:
let
repo = fetchFromGitHub {
owner = "kekrby";
repo = "tiny-dfr";
rev = "8a5d413cb1dbe2a25b77a9e7f3cb5b9c88ef3ffb";
hash = "sha256-l4D7aePz/CYpkRorrvsgIYrvSzoZl59OGcFGJqqJftk=";
};
in
rustPlatform.buildRustPackage rec {
pname = "tiny-dfr";
version = repo.rev;
src = repo;
cargoLock.lockFile = "${src}/Cargo.lock";
nativeBuildInputs = with pkgs; [
pkg-config
];
buildInputs = with pkgs; [
udev
glib
pango
cairo
gdk-pixbuf
libxml2
libinput
];
postPatch = ''
substituteInPlace src/main.rs --replace "/usr/share/tiny-dfr/" "$out/share/tiny-dfr/"
'';
postInstall = ''
mkdir -p $out/etc $out/share
cp -r etc/udev $out/etc/
cp -r share/tiny-dfr $out/share/
'';
meta = with pkgs.lib; {
description = "The most basic dynamic function row daemon possible";
homepage = "https://github.com/kekrby/tiny-dfr";
license = with licenses; [ asl20 bsd3 cc0 isc lgpl21Plus mit mpl20 unicode-dfs-2016 asl20 asl20-llvm mit unlicense ];
maintainers = [];
};
}

1933
apple/t2/pkgs/tiny-dfr/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,62 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
cairo,
gdk-pixbuf,
glib,
libinput,
libxml2,
pango,
udev,
}:
let
src = fetchFromGitHub {
owner = "kekrby";
repo = "tiny-dfr";
rev = "8a5d413cb1dbe2a25b77a9e7f3cb5b9c88ef3ffb";
hash = "sha256-l4D7aePz/CYpkRorrvsgIYrvSzoZl59OGcFGJqqJftk=";
};
in rustPlatform.buildRustPackage {
pname = "tiny-dfr";
version = src.rev;
inherit src;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [
pkg-config
];
buildInputs = [
udev
glib
pango
cairo
gdk-pixbuf
libxml2
libinput
];
postPatch = ''
substituteInPlace src/main.rs \
--replace-fail "/usr/share/tiny-dfr/" "$out/share/tiny-dfr/"
'';
postInstall = ''
mkdir -p $out/etc $out/share
cp -r etc/udev $out/etc/
cp -r share/tiny-dfr $out/share/
'';
meta = with lib; {
description = "The most basic dynamic function row daemon possible";
homepage = "https://github.com/kekrby/tiny-dfr";
license = with licenses; [ asl20 bsd3 cc0 isc lgpl21Plus mit mpl20 unicode-dfs-2016 asl20 asl20-llvm mit unlicense ];
maintainers = [];
};
}