git.iko.soy/typeable/cabal2nix
on master help sign in
Configure post-process hooks for ghc-parser.
commit38a0655f92756c9d9370dce1004c5cdf1dc1a69c authorPeter Simons <simons@cryp.to> dateFri 3 Oct 2014, 20:00 (12 years ago) parent7a8ac24
1 file changed+8
src/Cabal2Nix/PostProcess.hs+8
src/Cabal2Nix/PostProcess.hs+8
@@ -31,6 +31,7 @@ postProcess deriv@(MkDerivation {..})
3131 | pname == "either" = deriv { runHaddock = True, phaseOverrides = eitherNoHaddock }
3232 | pname == "ghc-heap-view" = deriv { phaseOverrides = ghciPostInstall }
3333 | pname == "ghc-mod" = deriv { phaseOverrides = ghcModPostInstall, buildTools = "emacs":"makeWrapper":buildTools }
34+ | pname == "ghc-parser" = deriv { buildTools = "cpphs":"happy":buildTools, phaseOverrides = ghcParserPatchPhase }
3435 | pname == "ghc-paths" = deriv { phaseOverrides = ghcPathsPatches }
3536 | pname == "ghc-vis" = deriv { phaseOverrides = ghciPostInstall }
3637 | pname == "git-annex" = deriv { phaseOverrides = gitAnnexOverrides, buildTools = "git":"rsync":"gnupg1":"curl":"lsof":"openssh":"which":"bup":"perl":buildTools }
@@ -301,3 +302,10 @@ splitDoCheck = sybDoCheck
301302
302303haddockPreCheck :: String
303304haddockPreCheck = "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+ ]