nix: set nix.nixPath
1 file changed, 21 insertions(+), 0 deletions(-)
changed files
A lib/default.nix
@@ -0,0 +1,21 @@ +{ pkgs }: +with builtins; +let + inherit (pkgs) lib; +in +rec { + importPathStore = p: "${append ../. "/${p}"}"; + + mkPathable = s: + if + s.type == "local" + then + lib.path.append ../. s.outPath + else + toString s.outPath + ; + + mkNixPath = sources: lib.attrsets.mapAttrsToList + (k: v: "${k}=${mkPathable v}") + (removeAttrs sources [ "__functor" ]); +}