]> git.scottworley.com Git - git-cache/blob - flake.nix
195cc33dac3dddd620869ba68e8e84c96d2a3354
[git-cache] / flake.nix
1 {
2 inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.03"; };
3 outputs = { self, nixpkgs, }:
4 let
5
6 inherit (builtins) attrNames;
7 inherit (nixpkgs.lib) genAttrs;
8
9 for-supported-systems = genAttrs (attrNames
10 ((import (nixpkgs + "/pkgs/top-level/release.nix")
11 { }).stdenvBootstrapTools));
12
13 packages = for-supported-systems (system: {
14 inherit (nixpkgs.legacyPackages."${system}".appendOverlays
15 [ self.overlay ])
16 git-cache;
17 });
18
19 in {
20 inherit packages;
21
22 overlay = final: prev: { git-cache = import ./. { pkgs = final; }; };
23 overlays = { git-cache = self.overlay; };
24
25 defaultApp = for-supported-systems (system: {
26 type = "app";
27 program = "${packages."${system}".git-cache}/bin/git-cache";
28 });
29 };
30 }