git.iko.soy/typeable/cabal2nix
on master help sign in
Fix unsafe concatenation of $LD_LIBRARY_PATH
843e591Anders Kaseorg
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs+1−1
@@ -255,7 +255,7 @@ gfPhaseOverrides = unlines
255 , " sed -i \"s|numJobs (bf bi)++||\" ./Setup.hs"
255 , " sed -i \"s|numJobs (bf bi)++||\" ./Setup.hs"
256 -- Parallel compilation fails. Disable it.
256 -- Parallel compilation fails. Disable it.
257 , "'';"
257 , "'';"
258− , "preBuild = ''export LD_LIBRARY_PATH=`pwd`/dist/build:$LD_LIBRARY_PATH'';"
258+ , "preBuild = ''export LD_LIBRARY_PATH=`pwd`/dist/build''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH'';"
259 -- The build step itself, after having built the library, needs to be able
259 -- The build step itself, after having built the library, needs to be able
260 -- to find the library it just built in order to compile grammar files.
260 -- to find the library it just built in order to compile grammar files.
261 ]
261 ]