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";