wip
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
diff --git a/asahi_firmware/update.py b/asahi_firmware/update.py
|
||||
index 8d4c480..7d89353 100644
|
||||
--- a/asahi_firmware/update.py
|
||||
+++ b/asahi_firmware/update.py
|
||||
@@ -30,7 +30,7 @@ def update_firmware(source, dest, manifest):
|
||||
|
||||
pkg.save_manifest(manifest)
|
||||
|
||||
-if __name__ == "__main__":
|
||||
+def main():
|
||||
import argparse
|
||||
import logging
|
||||
logging.basicConfig()
|
||||
@@ -46,3 +46,7 @@ if __name__ == "__main__":
|
||||
args = parser.parse_args()
|
||||
|
||||
update_firmware(args.source, args.dest, args.manifest)
|
||||
+
|
||||
+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"]}
|
||||
)
|
||||
24
machines/nat/m1-support/asahi-fwextract/default.nix
Executable file
24
machines/nat/m1-support/asahi-fwextract/default.nix
Executable file
@@ -0,0 +1,24 @@
|
||||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, makeBinaryWrapper
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "asahi-fwextract";
|
||||
version = "0.4pre2";
|
||||
|
||||
# tracking version: https://github.com/AsahiLinux/PKGBUILDs/blob/main/asahi-fwextract/PKGBUILD
|
||||
src = fetchFromGitHub {
|
||||
owner = "AsahiLinux";
|
||||
repo = "asahi-installer";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-RqvD2hNjKMlUg+oY1woUN5zpN+1Y/TrBQbokNgdeCW4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./add_entry_point.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ python3.pkgs.setuptools makeBinaryWrapper ];
|
||||
}
|
||||
Reference in New Issue
Block a user