git.iko.soy/typeable/cabal2nix
on master help sign in
Cabal2Nix/PostProcess.hs: build highlighting-kate with regex-pcre instead of regex-pcre-builtin

The package regex-pcre-builtin is a verbatim copy of the original regex-pcre library. The only difference is that the "-builtin" version has the entire libpcre source code included! Now, this is just wrong.

commit0a7e90e7d6c1ee1469eb54ced2bc20de3b5156cd authorPeter Simons <simons@cryp.to> dateTue 20 Nov 2012, 14:28 (14 years ago) parentfc2d234
1 file changed+7
src/Cabal2Nix/PostProcess.hs+7
src/Cabal2Nix/PostProcess.hs+7
@@ -25,6 +25,7 @@ postProcess deriv@(MkDerivation {..})
2525 | pname == "happy" = deriv { buildTools = "perl":buildTools }
2626 | pname == "haskell-src" = deriv { buildTools = "happy":buildTools }
2727 | pname == "haskell-src-meta" = deriv { buildDepends = "uniplate":buildDepends }
28+ | pname == "highlighting-kate"= highlightingKatePostProcessing deriv
2829 | pname == "hmatrix" = deriv { extraLibs = "gsl":"liblapack":"blas":extraLibs }
2930 | pname == "idris" = deriv { buildTools = "happy":buildTools }
3031 | pname == "language-c-quote" = deriv { buildTools = "alex":"happy":buildTools }
@@ -118,3 +119,9 @@ darcsInstallPostInstall = unlines
118119 , " mv contrib/darcs_completion $out/etc/bash_completion.d/darcs"
119120 , "'';"
120121 ]
122+
123+highlightingKatePostProcessing :: Derivation -> Derivation
124+highlightingKatePostProcessing deriv@(MkDerivation {..}) = deriv
125+ { phaseOverrides = "prePatch = \"sed -i -e 's|regex-pcre-builtin|regex-pcre|' highlighting-kate.cabal\";"
126+ , buildDepends = "regex-pcre" : filter (/="regex-pcre-builtin") buildDepends
127+ }