summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
new file mode 100644
index 00000000..93f64059
--- /dev/null
+++ b/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" ]);
+}