diff options
| author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-04-13 11:08:15 +0100 |
|---|---|---|
| committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-04-13 11:08:15 +0100 |
| commit | 8f48e49d71288b1e41d85e4e61a1a82f0d15a9af (patch) | |
| tree | 0044384fb1dbb59438d4e0b5e314066146570cfa | |
| parent | Merge pull request #7348 from dezgeg/bastet (diff) | |
| download | nixpkgs-8f48e49d71288b1e41d85e4e61a1a82f0d15a9af.tar.gz | |
haskell-ng: patch dyre to check NIX_GHC
xmonad is patched in similar manner already
| -rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 3 | ||||
| -rw-r--r-- | pkgs/development/haskell-modules/dyre-nix.patch | 25 |
2 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index d1880bf9d7a6..f3b276af6814 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -731,6 +731,9 @@ self: super: { # Tries to run GUI in tests leksah = dontCheck super.leksah; + # Patch to consider NIX_GHC just like xmonad does + dyre = appendPatch super.dyre ./dyre-nix.patch; + } // { # Not on Hackage. diff --git a/pkgs/development/haskell-modules/dyre-nix.patch b/pkgs/development/haskell-modules/dyre-nix.patch new file mode 100644 index 000000000000..458e540e0c4a --- /dev/null +++ b/pkgs/development/haskell-modules/dyre-nix.patch @@ -0,0 +1,25 @@ +--- dyre-0.8.12/Config/Dyre/Compile.hs 2015-04-13 11:00:20.794278350 +0100 ++++ dyre-0.8.12-patched/Config/Dyre/Compile.hs 2015-04-13 11:07:26.938893502 +0100 +@@ -10,11 +10,13 @@ + import System.FilePath ( (</>) ) + import System.Directory ( getCurrentDirectory, doesFileExist + , createDirectoryIfMissing ) ++import System.Environment ( lookupEnv ) ++import Control.Applicative ((<$>)) + import Control.Exception ( bracket ) +-import GHC.Paths ( ghc ) + + import Config.Dyre.Paths ( getPaths ) + import Config.Dyre.Params ( Params(..) ) ++import Data.Maybe ( fromMaybe ) + + -- | Return the path to the error file. + getErrorPath :: Params cfgType -> IO FilePath +@@ -47,6 +49,7 @@ + errFile <- getErrorPath params + result <- bracket (openFile errFile WriteMode) hClose $ \errHandle -> do + ghcOpts <- makeFlags params configFile tempBinary cacheDir libsDir ++ ghc <- fromMaybe "ghc" <$> lookupEnv "NIX_GHC" + ghcProc <- runProcess ghc ghcOpts (Just cacheDir) Nothing + Nothing Nothing (Just errHandle) + waitForProcess ghcProc |
