summary refs log tree commit diff stats
path: root/lib/default.nix
blob: a02fe34b0be44aea341f1fded18dab5bc7ad86fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ pkgs }:
with builtins;
let
  inherit (pkgs) lib;
in
rec {
  importPathStore = p: "${append ../. "/${p}"}";

  mkPathable = s: toString (
    if s.type == "local"
    then (lib.path.append ../. s.outPath)
    else s.outPath
  );

  mkNixPath = sources: lib.attrsets.mapAttrsToList
    (k: v: "${k}=${mkPathable v}")
    (removeAttrs sources [ "__functor" ]);
}