lib/default.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | { pkgs }:
with builtins;
let
inherit (pkgs) lib;
in
rec {
importPathStore = p: "${append ../. "/${p}"}";
mkPathable = s:
if
s.type == "local"
then
toString (lib.path.append ../. s.outPath)
else
toString s.outPath
;
mkNixPath = sources: lib.attrsets.mapAttrsToList
(k: v: "${k}=${mkPathable v}")
(removeAttrs sources [ "__functor" ]);
}
|