Add Nix flake and improve derivation

This adds a Nix flake to the repo as well as updates the derivation so
that it includes `lzip` as a dependency
This commit is contained in:
NullBite
2024-02-15 11:55:31 +01:00
parent 1a2d3ad643
commit b38e5d0399
4 changed files with 98 additions and 22 deletions
+4 -22
View File
@@ -1,22 +1,4 @@
with (import <nixpkgs> {});
stdenv.mkDerivation {
name = "waydroid_script";
buildInputs = [
(python3.withPackages(ps: with ps; [ tqdm requests inquirerpy ]))
];
src = ./.;
postPatch = ''
patchShebangs main.py
'';
installPhase = ''
mkdir -p $out/libexec
cp -r . $out/libexec/waydroid_script
mkdir -p $out/bin
ln -s $out/libexec/waydroid_script/main.py $out/bin/waydroid_script
'';
}
let
pkgs = import <nixpkgs> {};
in
pkgs.callPackage ./package.nix { }