From 208e7cae1aa08fee29e252242f811335f997c604 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sat, 3 May 2014 20:22:12 +0200 Subject: [PATCH] happy-1.19.3: patch code to build with ghc-head https://github.com/simonmar/happy/issues/20 --- pkgs/development/tools/parsing/happy/1.19.3.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/parsing/happy/1.19.3.nix b/pkgs/development/tools/parsing/happy/1.19.3.nix index b1a03fa3b9f8..c43806cd2df2 100644 --- a/pkgs/development/tools/parsing/happy/1.19.3.nix +++ b/pkgs/development/tools/parsing/happy/1.19.3.nix @@ -8,6 +8,10 @@ cabal.mkDerivation (self: { isExecutable = true; buildDepends = [ mtl ]; buildTools = [ perl ]; + preConfigure = self.stdenv.lib.optional (self.stdenv.lib.versionOlder "7.9" self.ghc.version) '' + sed -i -e 's|extensions: |extensions: FlexibleContexts, |' happy.cabal + sed -i -e 's|> import System.Exit|> import System.Exit ( exitWith, ExitCode(..) )|' src/Main.lhs + ''; meta = { homepage = "http://www.haskell.org/happy/"; description = "Happy is a parser generator for Haskell";