outputs: remove selfPath, but use that method in selfExpr default

by stringifying ./. then appending path, nix adds selfPath (nix-store path) to gcroot of selfPath derivation
This commit is contained in:
Wroclaw 2024-06-20 19:33:16 +02:00
parent 9e59fd06af
commit 19c4cb4c2f
2 changed files with 4 additions and 6 deletions

View file

@ -1,13 +1,11 @@
{ inputs ? import ./inputs.nix {}
, selfPath ? builtins.toString ./.
}:
{ inputs ? import ./inputs.nix {} }:
let
lib = (import "${inputs.nixpkgs}/lib").extend (import ./lib/overlays/version-info-fixup.nix { inherit inputs; });
self = {
inherit lib;
inherit lib inputs;
modifiedNixpkgs = import ./pkgs/top-level/impure.nix;
modifiedNixpkgsPure = import ./pkgs/top-level/default.nix;
overlays = {
@ -39,7 +37,7 @@ self = {
./hosts/${name}
{
config.nixpkgs.overlays = [
( import ./pkgs/overlays/selfExpr.nix { nixpkgsPath = ./pkgs/top-level/impure.nix; } )
( import ./pkgs/overlays/selfExpr.nix { nixpkgsPath = "${builtins.toString ./.}/pkgs/top-level/impure.nix"; } )
self.overlays.versionInfoFixup
];
}

View file

@ -25,7 +25,7 @@ self: super: {
in ''
{ ... } @ args:
import ${builtins.toString nixpkgsPath} {
import ${nixpkgsPath} {
${self.lib.optionalString useConfig configText}
} // builtins.removeAttrs args (builtins.fromJSON '''
${removedAttrNamesText}