haskell lib: Add appendConfigureFlags

For consistency and completeness; other helpers have these "plural"
variants too.
This commit is contained in:
John Ericson 2018-08-20 17:26:42 -04:00
parent f0d6e22b7f
commit 60fc04c34b

View File

@ -129,10 +129,12 @@ rec {
> haskell.lib.appendConfigureFlag haskellPackages.servant "--profiling-detail=all-functions"
*/
appendConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = (drv.configureFlags or []) ++ [x]; });
appendConfigureFlag = drv: x: appendConfigureFlags drv [x];
appendConfigureFlags = drv: xs: overrideCabal drv (drv: { configureFlags = (drv.configureFlags or []) ++ xs; });
appendBuildFlag = drv: x: overrideCabal drv (drv: { buildFlags = (drv.buildFlags or []) ++ [x]; });
appendBuildFlags = drv: xs: overrideCabal drv (drv: { buildFlags = (drv.buildFlags or []) ++ xs; });
/* removeConfigureFlag drv x is a Haskell package like drv, but with
all cabal configure arguments that are equal to x removed.