Skip to content

Commit da1102b

Browse files
committed
Nix: using lib.getDev instead of makeSearchPathOutput
1 parent cb26f44 commit da1102b

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/Stack/Nix.hs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,10 @@ runShellAndExit mprojectRoot getCompilerVersion getCmdArgs = do
9898
["with (import <nixpkgs> {}); "
9999
,"let inputs = ",pkgsStr,"; "
100100
, "libPath = lib.makeLibraryPath inputs; "
101-
, "stackExtraArgs = lib.concatStrings ("
102-
, "lib.foldl' (acc: p: acc ++ [\" --extra-lib-dirs \" p]) [] "
103-
, "(lib.splitString '':'' libPath) ++ "
104-
, "lib.foldl' (acc: p: acc ++ [\" --extra-include-dirs \" p]) [] "
105-
, "(lib.splitString '':'' (lib.makeSearchPathOutput ''dev'' ''include'' inputs))"
106-
, "); in "
101+
, "stackExtraArgs = lib.concatMap (pkg: "
102+
, "[ ''--extra-lib-dirs=${lib.getLib pkg}/lib'' "
103+
, " ''--extra-include-dirs=${lib.getDev pkg}/include'' ]"
104+
, ") inputs; in "
107105
,"runCommand ''myEnv'' { "
108106
,"buildInputs = lib.optional stdenv.isLinux glibcLocales ++ inputs; "
109107
,T.pack platformVariantEnvVar <> "=''nix''; "

0 commit comments

Comments
 (0)