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
+21
View File
@@ -0,0 +1,21 @@
{
description = "Waydroid Extras Script";
inputs = {
systems.url = "github:nix-systems/default";
};
outputs = { self, nixpkgs, systems }:
let
inherit (nixpkgs) lib;
eachSystem = lib.genAttrs (import systems);
mkApp = program: { type = "app"; inherit program; };
in {
packages = eachSystem (system: rec {
waydroid_script = nixpkgs.legacyPackages."${system}".callPackage ./package.nix { };
default = waydroid_script;
});
apps = eachSystem (system: rec {
waydroid_script = mkApp "${self.outputs.packages.${system}.waydroid_script}/bin/waydroid_script";
default = waydroid_script;
});
};
}