Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

46 lines
1.1 KiB
Nix

{
lib,
python3,
fetchFromGitHub,
gzip,
gnutar,
lzfse,
nix-update-script,
}:
python3.pkgs.buildPythonApplication rec {
pname = "asahi-fwextract";
version = "0.7.9";
pyproject = true;
src = fetchFromGitHub {
owner = "AsahiLinux";
repo = "asahi-installer";
tag = "v${version}";
hash = "sha256-vbhepoZ52k5tW2Gd7tfQTZ5CLqzhV7dUcVh6+AYwECk=";
};
postPatch = ''
substituteInPlace asahi_firmware/img4.py \
--replace-fail 'liblzfse.so' '${lzfse}/lib/liblzfse.so'
substituteInPlace asahi_firmware/update.py \
--replace-fail '"tar"' '"${gnutar}/bin/tar"' \
--replace-fail '"xf"' '"-x", "-I", "${gzip}/bin/gzip", "-f"'
'';
build-system = [ python3.pkgs.setuptools ];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Asahi firmware extraction script";
homepage = "https://github.com/AsahiLinux/asahi-installer";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ normalcea ];
mainProgram = "asahi-fwextract";
platforms = [ "aarch64-linux" ];
};
}