diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 8f54a9260e35..d18f22c3e62d 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -259,8 +259,18 @@ self: super: builtins.intersectAttrs super { ''; })); - # Patch to consider NIX_GHC just like xmonad does - dyre = appendPatch super.dyre ./patches/dyre-nix.patch; + dyre = + appendPatch + # dyre's tests appear to be trying to directly call GHC. + (dontCheck super.dyre) + # Dyre needs special support for reading the NIX_GHC env var. This is + # available upstream in https://github.com/willdonnelly/dyre/pull/43, but + # hasn't been released to Hackage as of dyre-0.9.1. Likely included in + # next version. + (pkgs.fetchpatch { + url = "https://github.com/willdonnelly/dyre/commit/c7f29d321aae343d6b314f058812dffcba9d7133.patch"; + sha256 = "10m22k35bi6cci798vjpy4c2l08lq5nmmj24iwp0aflvmjdgscdb"; + }); # https://github.com/edwinb/EpiVM/issues/13 # https://github.com/edwinb/EpiVM/issues/14 diff --git a/pkgs/development/haskell-modules/patches/dyre-nix.patch b/pkgs/development/haskell-modules/patches/dyre-nix.patch deleted file mode 100644 index 458e540e0c4a..000000000000 --- a/pkgs/development/haskell-modules/patches/dyre-nix.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- 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