git.iko.soy/typeable/cabal2nix
on master help sign in
Configure post-process hooks for ghc-parser.
38a0655Peter Simons
src/Cabal2Nix/PostProcess.hs+8
@@ -31,6 +31,7 @@ postProcess deriv@(MkDerivation {..})
31 | pname == "either" = deriv { runHaddock = True, phaseOverrides = eitherNoHaddock }
31 | pname == "either" = deriv { runHaddock = True, phaseOverrides = eitherNoHaddock }
32 | pname == "ghc-heap-view" = deriv { phaseOverrides = ghciPostInstall }
32 | pname == "ghc-heap-view" = deriv { phaseOverrides = ghciPostInstall }
33 | pname == "ghc-mod" = deriv { phaseOverrides = ghcModPostInstall, buildTools = "emacs":"makeWrapper":buildTools }
33 | pname == "ghc-mod" = deriv { phaseOverrides = ghcModPostInstall, buildTools = "emacs":"makeWrapper":buildTools }
34+ | pname == "ghc-parser" = deriv { buildTools = "cpphs":"happy":buildTools, phaseOverrides = ghcParserPatchPhase }
34 | pname == "ghc-paths" = deriv { phaseOverrides = ghcPathsPatches }
35 | pname == "ghc-paths" = deriv { phaseOverrides = ghcPathsPatches }
35 | pname == "ghc-vis" = deriv { phaseOverrides = ghciPostInstall }
36 | pname == "ghc-vis" = deriv { phaseOverrides = ghciPostInstall }
36 | pname == "git-annex" = deriv { phaseOverrides = gitAnnexOverrides, buildTools = "git":"rsync":"gnupg1":"curl":"lsof":"openssh":"which":"bup":"perl":buildTools }
37 | pname == "git-annex" = deriv { phaseOverrides = gitAnnexOverrides, buildTools = "git":"rsync":"gnupg1":"curl":"lsof":"openssh":"which":"bup":"perl":buildTools }
@@ -301,3 +302,10 @@ splitDoCheck = sybDoCheck
301
302
302haddockPreCheck :: String
303haddockPreCheck :: String
303haddockPreCheck = "preCheck = \"unset GHC_PACKAGE_PATH\";"
304haddockPreCheck = "preCheck = \"unset GHC_PACKAGE_PATH\";"
305+
306+ghcParserPatchPhase :: String
307+ghcParserPatchPhase = unlines
308+ [ "patchPhase = ''"
309+ , " substituteInPlace build-parser.sh --replace \"/bin/bash\" \"$SHELL\""
310+ , "'';"
311+ ]