X-Git-Url: http://git.scottworley.com/git-cache/blobdiff_plain/8a3cadee01d73669c5b8b1cc5bc23cd130235945..6fc1f7bacd3f9fce894df6e40887a5ec247e106a:/flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..49594a7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,25 @@ +{ + inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.03"; }; + outputs = { self, nixpkgs, }: + let + + inherit (builtins) attrNames; + inherit (nixpkgs.lib) genAttrs; + + for-supported-systems = genAttrs (attrNames + ((import (nixpkgs + "/pkgs/top-level/release.nix") + { }).stdenvBootstrapTools)); + + packages = for-supported-systems (system: { + git-cache = import ./. { pkgs = nixpkgs.legacyPackages."${system}"; }; + }); + + in { + inherit packages; + + defaultApp = for-supported-systems (system: { + type = "app"; + program = "${packages."${system}".git-cache}/bin/git-cache"; + }); + }; +}