]> git.scottworley.com Git - git-cache/commitdiff
Offer "overlay" and "overlays" flake outputs
authorChuck <chuck@intelligence.org>
Mon, 19 Apr 2021 22:36:51 +0000 (15:36 -0700)
committerChuck <chuck@intelligence.org>
Mon, 19 Apr 2021 22:42:42 +0000 (15:42 -0700)
This is the preferred way to define packages in flakes according to
https://github.com/NixOS/rfcs/pull/49/files#r448298299

Changelog
flake.nix

index 59f276a0f57c26e299694a475e0a32cd6d6f05e0..f81136aa1b066a9ca0a38e1fc083e85affa4d471 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,6 @@
 ## [Unreleased]
 ## [Unreleased]
+### Added
+- "overlay" and "overlays" flake outputs
 
 
 ## [1.2.3] - 2020-08-25
 
 
 ## [1.2.3] - 2020-08-25
index 49594a700f0186be3be5525cf4610dc07ed00f5b..195cc33dac3dddd620869ba68e8e84c96d2a3354 100644 (file)
--- a/flake.nix
+++ b/flake.nix
           { }).stdenvBootstrapTools));
 
       packages = for-supported-systems (system: {
           { }).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;
 
       });
 
     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";
       defaultApp = for-supported-systems (system: {
         type = "app";
         program = "${packages."${system}".git-cache}/bin/git-cache";