From 4e342aa8eed27c8193670612a3ba80087744277b Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 11 Nov 2024 17:05:57 -0500 Subject: [PATCH] refactor(nix): re-use overlay for pure packages --- flake.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index d255c30..3a866c3 100644 --- a/flake.nix +++ b/flake.nix @@ -80,11 +80,13 @@ pkgs = nixpkgsFor.${system}; packages' = self.packages.${system}; + refractionPackages = lib.makeScope pkgs.newScope (lib.flip self.overlays.default pkgs); + mkStatic = pkgs.callPackage ./nix/static.nix { }; containerize = pkgs.callPackage ./nix/containerize.nix { }; in { - refraction = pkgs.callPackage ./nix/package.nix { }; + inherit (refractionPackages) refraction; static-x86_64 = mkStatic { arch = "x86_64"; }; static-aarch64 = mkStatic { arch = "aarch64"; }; @@ -95,8 +97,8 @@ } ); - overlays.default = _: prev: { - refraction = prev.callPackage ./nix/package.nix { }; + overlays.default = final: _: { + refraction = final.callPackage ./nix/package.nix { }; }; }; }