summary refs log tree commit diff stats
path: root/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix18
1 files changed, 2 insertions, 16 deletions
diff --git a/shell.nix b/shell.nix
index 9167cb7e..81938c3f 100644
--- a/shell.nix
+++ b/shell.nix
@@ -2,26 +2,12 @@ with builtins;
 
 let
   sources = import ./nix/sources.nix;
-  sourcesJSON = fromJSON (readFile ./nix/sources.json);
 
   nixpkgs = sources.nixpkgs;
   pkgs = import nixpkgs { };
-  inherit (pkgs.lib) path attrsets;
+  lib = import ./lib { inherit pkgs; };
 
-  mkPathable = v: toString (
-    if
-      path.subpath.isValid v
-    then
-      path.append ./. v
-    else
-      v
-  );
-
-  nixPath = concatStringsSep ":" (
-    attrsets.mapAttrsToList
-      (k: v: "${k}=${mkPathable (getAttr "outPath" v)}")
-      (intersectAttrs sourcesJSON sources)
-  );
+  nixPath = concatStringsSep ":" (lib.mkNixPath sources);
 in
 pkgs.mkShell
 {