{ 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"; }); }; }