default: set name for selfInStore

This commit is contained in:
Wroclaw 2025-02-27 23:38:38 +01:00
parent a8da791356
commit 278987461a

View file

@ -13,7 +13,10 @@ let
storePathLength = builtins.stringLength (builtins.toString builtins.storeDir);
evaluatingInStore = (builtins.substring 0 storePathLength currentFilePath) == builtins.storeDir;
selfInStore = builtins.filterSource (path: type:
selfInStore = builtins.path {
path = ./.;
name = "source";
filter = path: type:
let
selfPath = builtins.dirOf currentFilePath;
gitIgnoreFilters = lib.parseGitignore selfPath path;
@ -21,8 +24,8 @@ let
&& type != "symlink"
&& builtins.baseNameOf path != ".git"
&& lib.runGitignoreFilter gitIgnoreFilters path type;
in result
) ./.;
in result;
};
in
if !(evaluatingInStore) then { ... }@args: import selfInStore ({ selfPath = selfInStore; } // args )
else { ... }@args: import ./outputs.nix ({ selfPath = selfInStore; } // args)