{ 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)); in { overlay = final: prev: { git-cache = import ./. { pkgs = final; }; }; overlays = { git-cache = self.overlay; }; packages = for-supported-systems (system: { inherit (nixpkgs.legacyPackages."${system}".appendOverlays [ self.overlay ]) git-cache; }); defaultApp = for-supported-systems (system: { type = "app"; program = "${self.packages."${system}".git-cache}/bin/git-cache"; }); }; }