Compare commits
4 commits
3c9a6ebd7d
...
ee05202f5d
Author | SHA1 | Date | |
---|---|---|---|
ee05202f5d | |||
f8a0c6a50c | |||
09f1929960 | |||
3abc719c76 |
3 changed files with 32 additions and 14 deletions
18
default.nix
18
default.nix
|
@ -13,7 +13,8 @@ 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.path {
|
gitlessSelfInStore = {
|
||||||
|
outPath = builtins.path {
|
||||||
path = ./.;
|
path = ./.;
|
||||||
name = "source";
|
name = "source";
|
||||||
filter = path: type:
|
filter = path: type:
|
||||||
|
@ -26,6 +27,19 @@ let
|
||||||
&& lib.runGitignoreFilter gitIgnoreFilters path type;
|
&& lib.runGitignoreFilter gitIgnoreFilters path type;
|
||||||
in result;
|
in result;
|
||||||
};
|
};
|
||||||
|
selfMode = "path";
|
||||||
|
};
|
||||||
|
gitfullSelfInStore = builtins.fetchGit "file://${builtins.toString ./.}" // {
|
||||||
|
selfMode = "git";
|
||||||
|
};
|
||||||
|
|
||||||
|
selfInStore' = builtins.tryEval gitfullSelfInStore;
|
||||||
|
selfInStore = if selfInStore'.success then selfInStore'.value else gitlessSelfInStore;
|
||||||
in
|
in
|
||||||
if !(evaluatingInStore) then { ... }@args: import selfInStore ({ selfPath = selfInStore; } // args )
|
if !(evaluatingInStore) then { ... }@args: import selfInStore ({
|
||||||
|
selfPath = {
|
||||||
|
outPath = builtins.toString ./.;
|
||||||
|
selfMode = "store";
|
||||||
|
};
|
||||||
|
} // args )
|
||||||
else { ... }@args: import ./outputs.nix ({ selfPath = selfInStore; } // args)
|
else { ... }@args: import ./outputs.nix ({ selfPath = selfInStore; } // args)
|
||||||
|
|
|
@ -54,6 +54,7 @@ in {
|
||||||
nix.package = wrappedNixExecutables false;
|
nix.package = wrappedNixExecutables false;
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.nix-output-monitor
|
pkgs.nix-output-monitor
|
||||||
|
pkgs.nix-diff
|
||||||
] ++ lib.map (lib.hiPrio) [
|
] ++ lib.map (lib.hiPrio) [
|
||||||
(wrappedNixExecutables true)
|
(wrappedNixExecutables true)
|
||||||
wrappedNixosExecutables
|
wrappedNixosExecutables
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
{
|
{
|
||||||
inputsPath ? ./inputs.nix,
|
inputsPath ? ./inputs.nix,
|
||||||
inputs ? import inputsPath {},
|
inputs ? import inputsPath {},
|
||||||
selfPath ? builtins.toString ./.,
|
selfPath ? {
|
||||||
|
outPath = builtins.toString ./.;
|
||||||
|
selfMode = "impure";
|
||||||
|
},
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue