diff options
author | sefidel <contact@sefidel.net> | 2023-02-15 14:32:53 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-02-15 15:26:43 +0900 |
commit | 08d7136a2e3150dd898cf2d2d3756801dfb407bd (patch) | |
tree | a43164886b2238b070f12f004d1ae0ecf56a77ac /nixos/modules/apple-silicon-support/packages/asahi-fwextract | |
parent | f8d602464b299533806e72986a846d2d8025482e (diff) | |
download | nixrc-08d7136a2e3150dd898cf2d2d3756801dfb407bd.tar.gz nixrc-08d7136a2e3150dd898cf2d2d3756801dfb407bd.zip |
feat(nixos/kompakt): use flakes for asahi-related dependencies
Imports are done directly inside the system configuration file to ensure one doesn't forget to import the required modules.
Diffstat (limited to 'nixos/modules/apple-silicon-support/packages/asahi-fwextract')
-rw-r--r-- | nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch | 31 | ||||
-rwxr-xr-x | nixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix | 36 |
2 files changed, 0 insertions, 67 deletions
diff --git a/nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch b/nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch deleted file mode 100644 index 3c808fe..0000000 --- a/nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/asahi_firmware/update.py b/asahi_firmware/update.py -index 45f1acf..e87e26e 100644 ---- a/asahi_firmware/update.py -+++ b/asahi_firmware/update.py -@@ -35,7 +35,7 @@ def update_firmware(source, dest): - - pkg.save_manifest(os.path.join(dest, "manifest.txt")) - --if __name__ == "__main__": -+def main(): - import argparse - import logging - logging.basicConfig() -@@ -49,3 +49,7 @@ if __name__ == "__main__": - args = parser.parse_args() - - update_firmware(args.source, args.dest) -+ -+if __name__ == "__main__": -+ main() -+ -diff --git a/setup.py b/setup.py -index 45ada19..1b371ba 100644 ---- a/setup.py -+++ b/setup.py -@@ -9,4 +9,5 @@ setup(name='asahi_firmware', - author_email='marcan@marcan.st', - url='https://github.com/AsahiLinux/asahi-installer/', - packages=['asahi_firmware'], -+ entry_points={"console_scripts": ["asahi-fwextract = asahi_firmware.update:main"]} - ) diff --git a/nixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix b/nixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix deleted file mode 100755 index 992d250..0000000 --- a/nixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib -, python3 -, fetchFromGitHub -, gzip -, gnutar -, lzfse -}: - -python3.pkgs.buildPythonApplication rec { - pname = "asahi-fwextract"; - version = "0.5pre2"; - - # tracking version: https://github.com/AsahiLinux/PKGBUILDs/blob/main/asahi-fwextract/PKGBUILD - src = fetchFromGitHub { - owner = "AsahiLinux"; - repo = "asahi-installer"; - rev = "v${version}"; - hash = "sha256-p34eN2iE1s8rupdysjyf6GN8kHkVG9NDw31YKPDNXbk="; - }; - - patches = [ - ./add_entry_point.patch - ]; - - 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; -} |