mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-24 01:33:55 +01:00
33 lines
796 B
Nix
Executable file
33 lines
796 B
Nix
Executable file
{
|
|
lib,
|
|
python3,
|
|
fetchFromGitHub,
|
|
gzip,
|
|
gnutar,
|
|
lzfse,
|
|
}:
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "asahi-fwextract";
|
|
version = "0.6.9";
|
|
|
|
# tracking version: https://github.com/AsahiLinux/PKGBUILDs/blob/main/asahi-fwextract/PKGBUILD
|
|
src = fetchFromGitHub {
|
|
owner = "AsahiLinux";
|
|
repo = "asahi-installer";
|
|
rev = "v${version}";
|
|
hash = "sha256-MkNi4EBgT4gfev/yWqYyw5HZxewj6XTfb8na+eI2iVo=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace asahi_firmware/img4.py \
|
|
--replace 'liblzfse.so' '${lzfse}/lib/liblzfse.so'
|
|
substituteInPlace asahi_firmware/update.py \
|
|
--replace '"tar"' '"${gnutar}/bin/tar"' \
|
|
--replace '"xf"' '"-x", "-I", "${gzip}/bin/gzip", "-f"'
|
|
'';
|
|
|
|
nativeBuildInputs = [python3.pkgs.setuptools];
|
|
|
|
doCheck = false;
|
|
}
|