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);
|
storePathLength = builtins.stringLength (builtins.toString builtins.storeDir);
|
||||||
evaluatingInStore = (builtins.substring 0 storePathLength currentFilePath) == 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
|
let
|
||||||
selfPath = builtins.dirOf currentFilePath;
|
selfPath = builtins.dirOf currentFilePath;
|
||||||
gitIgnoreFilters = lib.parseGitignore selfPath path;
|
gitIgnoreFilters = lib.parseGitignore selfPath path;
|
||||||
|
@ -21,8 +24,8 @@ let
|
||||||
&& type != "symlink"
|
&& type != "symlink"
|
||||||
&& builtins.baseNameOf path != ".git"
|
&& builtins.baseNameOf path != ".git"
|
||||||
&& lib.runGitignoreFilter gitIgnoreFilters path type;
|
&& lib.runGitignoreFilter gitIgnoreFilters path type;
|
||||||
in result
|
in result;
|
||||||
) ./.;
|
};
|
||||||
in
|
in
|
||||||
if !(evaluatingInStore) then { ... }@args: import selfInStore ({ selfPath = selfInStore; } // args )
|
if !(evaluatingInStore) then { ... }@args: import selfInStore ({ selfPath = selfInStore; } // args )
|
||||||
else { ... }@args: import ./outputs.nix ({ selfPath = selfInStore; } // args)
|
else { ... }@args: import ./outputs.nix ({ selfPath = selfInStore; } // args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue