diff options
author | Nikolay Amiantov <ab@fmap.me> | 2015-06-12 03:22:50 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2015-06-12 03:42:29 +0300 |
commit | 6cc817cf516159efa48f5322bfb1bf258ae01501 (patch) | |
tree | 70dc597ac29b4718691ecc870437efb1e4067682 | |
parent | 21569371662a891b0837257508a3cf1c7cc1dd66 (diff) | |
download | nixpkgs-6cc817cf516159efa48f5322bfb1bf258ae01501.tar nixpkgs-6cc817cf516159efa48f5322bfb1bf258ae01501.tar.gz nixpkgs-6cc817cf516159efa48f5322bfb1bf258ae01501.tar.bz2 nixpkgs-6cc817cf516159efa48f5322bfb1bf258ae01501.tar.lz nixpkgs-6cc817cf516159efa48f5322bfb1bf258ae01501.tar.xz nixpkgs-6cc817cf516159efa48f5322bfb1bf258ae01501.tar.zst nixpkgs-6cc817cf516159efa48f5322bfb1bf258ae01501.zip |
mueval: add patch until release is pushed to Hackage
3 files changed, 91 insertions, 6 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 7835ed7d96f..e1f45351a78 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -760,7 +760,7 @@ self: super: { dyre = appendPatch super.dyre ./dyre-nix.patch; # https://github.com/gwern/mueval/issues/9 - mueval = markBrokenVersion "0.9.1.1" super.mueval; + mueval = appendPatch super.mueval ./mueval-fix.patch; # Test suite won't compile against tasty-hunit 0.9.x. zlib = dontCheck super.zlib; diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index 335b133f555..28c74f61925 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -116,11 +116,6 @@ self: super: { # https://github.com/kazu-yamamoto/unix-time/issues/30 unix-time = dontCheck super.unix-time; - # Until the changes have been pushed to Hackage - mueval = appendPatch super.mueval (pkgs.fetchpatch { - url = "https://github.com/gwern/mueval/commit/c41aa40ed63b74c069d1e4e3caa8c8d890cde960.patch"; - sha256 = "0h1lx4z15imq009k0qmwkn5l3hmigw463ahvwffdnszi2n618kpg"; - }); present = appendPatch super.present (pkgs.fetchpatch { url = "https://github.com/chrisdone/present/commit/6a61f099bf01e2127d0c68f1abe438cd3eaa15f7.patch"; sha256 = "1vn3xm38v2f4lzyzkadvq322f3s2yf8c88v56wpdpzfxmvlzaqr8"; diff --git a/pkgs/development/haskell-modules/mueval-fix.patch b/pkgs/development/haskell-modules/mueval-fix.patch new file mode 100644 index 00000000000..62a8f8f61e2 --- /dev/null +++ b/pkgs/development/haskell-modules/mueval-fix.patch @@ -0,0 +1,90 @@ +diff --git a/Mueval/ArgsParse.hs b/Mueval/ArgsParse.hs +index 05c8fd9..0c32e27 100644 +--- a/Mueval/ArgsParse.hs ++++ b/Mueval/ArgsParse.hs +@@ -1,10 +1,9 @@ ++{-# LANGUAGE CPP #-} + module Mueval.ArgsParse (Options(..), interpreterOpts, getOptions) where + + import Control.Monad (liftM) + import System.Console.GetOpt + +-import qualified Codec.Binary.UTF8.String as Codec (decodeString) +- + import Mueval.Context (defaultModules, defaultPackages) + + -- | See the results of --help for information on what each option means. +@@ -98,4 +97,11 @@ header = "Usage: mueval [OPTION...] --expression EXPRESSION..." + -- | Just give us the end result options; this parsing for + -- us. Bonus points for handling UTF. + getOptions :: [String] -> Either (Bool, String) Options +-getOptions = interpreterOpts . map Codec.decodeString +\ No newline at end of file ++getOptions = interpreterOpts . map decodeString ++ ++decodeString :: String -> String ++#if __GLASGOW_HASKELL__ >= 702 ++decodeString = id ++#else ++decodeString = Codec.decodeString ++#endif +diff --git a/Mueval/Context.hs b/Mueval/Context.hs +index 78925cf..548514c 100644 +--- a/Mueval/Context.hs ++++ b/Mueval/Context.hs +@@ -1,3 +1,4 @@ ++{-# LANGUAGE CPP #-} + module Mueval.Context ( + cleanModules, + defaultModules, +@@ -32,7 +33,9 @@ defaultModules = ["Prelude", + "Control.Monad.Error", + "Control.Monad.Fix", + "Control.Monad.Identity", ++#if !MIN_VERSION_base(4,7,0) + "Control.Monad.Instances", ++#endif + "Control.Monad.RWS", + "Control.Monad.Reader", + "Control.Monad.State", +diff --git a/Mueval/Interpreter.hs b/Mueval/Interpreter.hs +index 29b771f..6c39482 100644 +--- a/Mueval/Interpreter.hs ++++ b/Mueval/Interpreter.hs +@@ -1,4 +1,5 @@ + {-# LANGUAGE PatternGuards #-} ++{-# LANGUAGE FlexibleContexts #-} + -- TODO: suggest the convenience functions be put into Hint proper? + module Mueval.Interpreter where + +@@ -12,8 +13,6 @@ import System.Exit (exitFailure) + import System.FilePath.Posix (takeFileName) + import qualified Control.Exception.Extensible as E (evaluate,catch,SomeException(..)) + +-import qualified System.IO.UTF8 as UTF (putStrLn) +- + import Language.Haskell.Interpreter (eval, set, reset, setImportsQ, loadModules, liftIO, + installedModulesInScope, languageExtensions, + typeOf, setTopLevelModules, runInterpreter, glasgowExtensions, +@@ -100,7 +99,7 @@ mvload lfl = do canonfile <- makeRelativeToCurrentDirectory lfl + -- flooding. Lambdabot has a similar limit. + sayIO :: String -> IO () + sayIO str = do (out,b) <- render 1024 str +- UTF.putStrLn out ++ putStrLn out + when b exitFailure + + -- | Oh no, something has gone wrong. If it's a compilation error pretty print +diff --git a/mueval.cabal b/mueval.cabal +index 3f9406d..b86d796 100644 +--- a/mueval.cabal ++++ b/mueval.cabal +@@ -32,7 +32,7 @@ library + exposed-modules: Mueval.Parallel, Mueval.Context, Mueval.Interpreter, + Mueval.ArgsParse, Mueval.Resources + build-depends: base>=4 && < 5, containers, directory, mtl>2, filepath, unix, process, +- hint>=0.3.1, show>=0.3, utf8-string, Cabal, extensible-exceptions, simple-reflect ++ hint>=0.3.1, show>=0.3, Cabal, extensible-exceptions, simple-reflect + ghc-options: -Wall -static + + executable mueval-core |