From: Chuck Date: Mon, 19 Apr 2021 22:36:51 +0000 (-0700) Subject: Offer "overlay" and "overlays" flake outputs X-Git-Tag: v1.3.0~2 X-Git-Url: http://git.scottworley.com/git-cache/commitdiff_plain/9f4532133d9e812f492207d61eaa871043193a39?ds=inline;hp=5b9fb2cc74808778004c96132d6a9e4ec175c768 Offer "overlay" and "overlays" flake outputs This is the preferred way to define packages in flakes according to https://github.com/NixOS/rfcs/pull/49/files#r448298299 --- diff --git a/Changelog b/Changelog index 59f276a..f81136a 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,6 @@ ## [Unreleased] +### Added +- "overlay" and "overlays" flake outputs ## [1.2.3] - 2020-08-25 diff --git a/flake.nix b/flake.nix index 49594a7..195cc33 100644 --- a/flake.nix +++ b/flake.nix @@ -11,12 +11,17 @@ { }).stdenvBootstrapTools)); packages = for-supported-systems (system: { - git-cache = import ./. { pkgs = nixpkgs.legacyPackages."${system}"; }; + inherit (nixpkgs.legacyPackages."${system}".appendOverlays + [ self.overlay ]) + git-cache; }); in { inherit packages; + overlay = final: prev: { git-cache = import ./. { pkgs = final; }; }; + overlays = { git-cache = self.overlay; }; + defaultApp = for-supported-systems (system: { type = "app"; program = "${packages."${system}".git-cache}/bin/git-cache";