@@ -60,7 +60,7 @@ prefsUpdate = let
6060 spackSrc = scalar ;
6161 spackConfig = lib . recursiveUpdate ;
6262 spackPython = scalar ;
63- spackPath = scalar ;
63+ spackEnv = a : b : a // b ;
6464 nixpkgsSrc = scalar ;
6565 verbose = scalar ;
6666 repoPatch = a : b : a // b ;
@@ -77,7 +77,9 @@ packsWithPrefs =
7777 , spackSrc ? { }
7878 , spackConfig ? { }
7979 , spackPython ? "/usr/bin/python3"
80- , spackPath ? "/bin:/usr/bin"
80+ , spackEnv ? {
81+ PATH = "/bin:/usr/bin" ;
82+ }
8183 , nixpkgsSrc ? null
8284 , repos ? [ ../spack/repo ]
8385 , repoPatch ? { }
@@ -99,22 +101,21 @@ lib.fix (packs: with packs; {
99101
100102 makeSpackConfig = import ../spack/config.nix packs ;
101103
102- inherit spackPython spackPath ;
104+ inherit spackPython spackEnv ;
103105 spackConfig = makeSpackConfig ( lib . recursiveUpdate defaultSpackConfig packPrefs . spackConfig ) ;
104106
105- spackNixLib = derivation {
107+ spackNixLib = derivation ( spackEnv // {
106108 name = "nix-spack-py" ;
107109 inherit system ;
108110 builder = ../spack/install.sh ;
109111 src = ../spack/nixpack.py ;
110- } ;
112+ } ) ;
111113
112114 /* common attributes for running spack */
113- spackBuilder = attrs : builtins . removeAttrs ( derivation ( {
115+ spackBuilder = attrs : builtins . removeAttrs ( derivation ( spackEnv // {
114116 inherit ( packs ) system os spackConfig ;
115117 builder = spackPython ;
116118 PYTHONPATH = "${ spackNixLib } :${ spack } /lib/spack:${ spack } /lib/spack/external" ;
117- PATH = spackPath ;
118119 LC_ALL = "en_US.UTF-8" ; # work around spack bugs processing log files
119120 repos = if attrs ? withRepos
120121 then if attrs . withRepos
0 commit comments