Move call-flake.nix into libexpr
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
locks: rootSrc: rootSubdir:
|
||||
|
||||
let
|
||||
|
||||
callFlake = sourceInfo: subdir: locks:
|
||||
let
|
||||
flake = import (sourceInfo + "/" + subdir + "/flake.nix");
|
||||
|
||||
inputs = builtins.mapAttrs (n: v:
|
||||
if v.flake or true
|
||||
then callFlake (fetchTree (removeAttrs v.locked ["dir"])) (v.locked.dir or "") v.inputs
|
||||
else fetchTree v.locked) locks;
|
||||
|
||||
outputs = flake.outputs (inputs // { self = result; });
|
||||
|
||||
result = outputs // sourceInfo // { inherit inputs; inherit outputs; inherit sourceInfo; };
|
||||
in
|
||||
assert flake.edition == 201909;
|
||||
|
||||
result;
|
||||
|
||||
in callFlake rootSrc rootSubdir (builtins.fromJSON locks).inputs
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
corepkgs_FILES = \
|
||||
unpack-channel.nix \
|
||||
derivation.nix \
|
||||
fetchurl.nix \
|
||||
call-flake.nix
|
||||
fetchurl.nix
|
||||
|
||||
$(foreach file,config.nix $(corepkgs_FILES),$(eval $(call install-data-in,$(d)/$(file),$(datadir)/nix/corepkgs)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user