feat: package get-apple-firmware script

This commit is contained in:
Cassie Cheung 2024-09-03 17:38:02 +08:00
parent 7dd752f191
commit 412ca0ba40
No known key found for this signature in database
2 changed files with 25 additions and 0 deletions

View file

@ -21,6 +21,7 @@
git
python3
dmg2img
(pkgs.callPackage ./pkgs/firmware-script.nix {})
];
# ZFS is (sometimes) broken and prevents building without this

View file

@ -0,0 +1,24 @@
{ stdenvNoCC, fetchurl, lib }: stdenvNoCC.mkDerivation (final: {
pname = "get-apple-firmware";
version = "fe8c338e6cf1238a390984ba06544833ab8792d3";
src = fetchurl {
url = "https://raw.github.com/t2linux/wiki/${final.version}/docs/tools/firmware.sh";
hash = "sha256-DYghvLnG3DO8WmLIrT4p5yzCDWRevp3vx0wYtdTLyeY=";
};
dontUnpack = true;
buildPhase = ''
mkdir -p $out/bin
cp ${final.src} $out/bin/get-apple-firmware
chmod +x $out/bin/get-apple-firmware
'';
meta = {
description = "A script to get needed firmware for T2linux devices";
homepage = "https://t2linux.org";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ soopyc ];
mainProgram = "get-apple-firmware";
};
})