lol
at 18.03-beta 25 lines 1.1 kB view raw
1--- dyre-0.8.12/Config/Dyre/Compile.hs 2015-04-13 11:00:20.794278350 +0100 2+++ dyre-0.8.12-patched/Config/Dyre/Compile.hs 2015-04-13 11:07:26.938893502 +0100 3@@ -10,11 +10,13 @@ 4 import System.FilePath ( (</>) ) 5 import System.Directory ( getCurrentDirectory, doesFileExist 6 , createDirectoryIfMissing ) 7+import System.Environment ( lookupEnv ) 8+import Control.Applicative ((<$>)) 9 import Control.Exception ( bracket ) 10-import GHC.Paths ( ghc ) 11 12 import Config.Dyre.Paths ( getPaths ) 13 import Config.Dyre.Params ( Params(..) ) 14+import Data.Maybe ( fromMaybe ) 15 16 -- | Return the path to the error file. 17 getErrorPath :: Params cfgType -> IO FilePath 18@@ -47,6 +49,7 @@ 19 errFile <- getErrorPath params 20 result <- bracket (openFile errFile WriteMode) hClose $ \errHandle -> do 21 ghcOpts <- makeFlags params configFile tempBinary cacheDir libsDir 22+ ghc <- fromMaybe "ghc" <$> lookupEnv "NIX_GHC" 23 ghcProc <- runProcess ghc ghcOpts (Just cacheDir) Nothing 24 Nothing Nothing (Just errHandle) 25 waitForProcess ghcProc