Skip to content

Commit

Permalink
feat: package get-apple-firmware script
Browse files Browse the repository at this point in the history
  • Loading branch information
soopyc committed Sep 3, 2024
1 parent 7dd752f commit 412ca0b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions nix/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
git
python3
dmg2img
(pkgs.callPackage ./pkgs/firmware-script.nix {})
];

# ZFS is (sometimes) broken and prevents building without this
Expand Down
24 changes: 24 additions & 0 deletions nix/pkgs/firmware-script.nix
Original file line number Diff line number Diff line change
@@ -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";
};
})

0 comments on commit 412ca0b

Please sign in to comment.