mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
haskellPackages.mueval: fix evaluation
This commit is contained in:
parent
d56e9b4f05
commit
8d91cc7637
@ -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.
|
||||
|
22
pkgs/development/haskell-modules/lambdabot-fix-ghc78.patch
Normal file
22
pkgs/development/haskell-modules/lambdabot-fix-ghc78.patch
Normal file
@ -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
|
23
pkgs/development/haskell-modules/mueval-nix.patch
Normal file
23
pkgs/development/haskell-modules/mueval-nix.patch
Normal file
@ -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 ->
|
Loading…
Reference in New Issue
Block a user