default: set name for selfInStore
This commit is contained in:
parent
a8da791356
commit
278987461a
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue