diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 631d0b713b8e..6a1779dfe354 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -754,6 +754,14 @@ self: super: { # Patch to consider NIX_GHC just like xmonad does dyre = appendPatch super.dyre ./dyre-nix.patch; + # Fix problems with GHC >=7.8 (in compatible way) + mueval = let pkg = appendPatch super.mueval (pkgs.fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/gwern/mueval/pull/4.patch"; + sha256 = "1l0jn2lbzbhx9ifbpb5g617qa0fc8fwa6kyr87pjqfxpqminsgp5"; + }); + # Nix-specific workaround + in appendPatch pkg ./mueval-nix.patch; + } // { # Not on Hackage. diff --git a/pkgs/development/haskell-modules/lambdabot-fix-ghc78.patch b/pkgs/development/haskell-modules/lambdabot-fix-ghc78.patch new file mode 100644 index 000000000000..0a0ed65803a0 --- /dev/null +++ b/pkgs/development/haskell-modules/lambdabot-fix-ghc78.patch @@ -0,0 +1,22 @@ +diff -ru3 lambdabot-5.0.1.old/State/L.hs lambdabot-5.0.1/State/L.hs +--- lambdabot-5.0.1.old/State/L.hs 2015-04-15 03:26:04.818947594 +0300 ++++ lambdabot-5.0.1/State/L.hs 2015-04-15 03:26:20.386099365 +0300 +@@ -34,7 +34,6 @@ + import Control.Monad + import Control.Monad.Cont + import Control.Monad.Identity +-import Control.Monad.Instances + import Control.Monad.Reader + import Control.Monad.ST.Safe + import Control.Monad.State +diff -ru3 lambdabot-5.0.1.old/State/Pristine.hs lambdabot-5.0.1/State/Pristine.hs +--- lambdabot-5.0.1.old/State/Pristine.hs 2015-04-15 03:26:04.818947594 +0300 ++++ lambdabot-5.0.1/State/Pristine.hs 2015-04-15 03:26:20.386099365 +0300 +@@ -34,7 +34,6 @@ + import Control.Monad + import Control.Monad.Cont + import Control.Monad.Identity +-import Control.Monad.Instances + import Control.Monad.Reader + import Control.Monad.ST.Safe + import Control.Monad.State diff --git a/pkgs/development/haskell-modules/mueval-nix.patch b/pkgs/development/haskell-modules/mueval-nix.patch new file mode 100644 index 000000000000..a1f95120a1f7 --- /dev/null +++ b/pkgs/development/haskell-modules/mueval-nix.patch @@ -0,0 +1,23 @@ +diff --git a/Mueval/Interpreter.hs b/Mueval/Interpreter.hs +index 29b771f..6360ee3 100644 +--- a/Mueval/Interpreter.hs ++++ b/Mueval/Interpreter.hs +@@ -8,6 +8,7 @@ import Control.Monad.Writer (Any(..),runWriterT,tell) + import Data.Char (isDigit) + import Data.List (stripPrefix) + import System.Directory (copyFile, makeRelativeToCurrentDirectory, removeFile, setCurrentDirectory) ++import System.Environment (lookupEnv) + import System.Exit (exitFailure) + import System.FilePath.Posix (takeFileName) + import qualified Control.Exception.Extensible as E (evaluate,catch,SomeException(..)) +@@ -47,6 +48,10 @@ interpreter Options { extensions = exts, namedExtensions = nexts, + -- Explicitly adding ImplicitPrelude because of + -- http://darcsden.com/jcpetruzza/hint/issue/1 + unless (null lexts) $ set [languageExtensions := (UnknownExtension "ImplicitPrelude" : lexts)] ++ pkgs' <- liftIO $ lookupEnv "NIX_GHC_LIBDIR" ++ case pkgs' of ++ Just pkgs -> unsafeSetGhcOption ("-package-db " ++ pkgs ++ "/package.conf.d") ++ Nothing -> return () + when trust $ do + unsafeSetGhcOption "-fpackage-trust" + forM_ (trustPkgs >>= words) $ \pkg ->