2015-01-10 22:26:08 +03:00
|
|
|
{ pkgs }:
|
|
|
|
|
|
|
|
rec {
|
2015-01-07 22:31:32 +03:00
|
|
|
|
|
|
|
overrideCabal = drv: f: drv.override (args: args // {
|
|
|
|
mkDerivation = drv: args.mkDerivation (drv // f drv);
|
|
|
|
});
|
|
|
|
|
2015-01-10 22:26:08 +03:00
|
|
|
doHaddock = drv: overrideCabal drv (drv: { noHaddock = false; });
|
|
|
|
dontHaddock = drv: overrideCabal drv (drv: { noHaddock = true; });
|
|
|
|
|
|
|
|
doJailbreak = drv: overrideCabal drv (drv: { jailbreak = true; });
|
|
|
|
dontJailbreak = drv: overrideCabal drv (drv: { jailbreak = false; });
|
|
|
|
|
2015-01-12 03:28:15 +03:00
|
|
|
doCheck = drv: overrideCabal drv (drv: { doCheck = true; });
|
2015-01-10 22:26:08 +03:00
|
|
|
dontCheck = drv: overrideCabal drv (drv: { doCheck = false; });
|
|
|
|
|
|
|
|
dontDistribute = drv: overrideCabal drv (drv: { hydraPlatforms = []; });
|
|
|
|
|
2015-01-12 03:28:15 +03:00
|
|
|
appendConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = (drv.configureFlags or []) ++ [x]; });
|
2015-01-10 22:26:08 +03:00
|
|
|
removeConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = pkgs.stdenv.lib.remove x (drv.configureFlags or []); });
|
|
|
|
|
|
|
|
enableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f-${x}") "-f${x}";
|
|
|
|
disableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f${x}") "-f-${x}";
|
|
|
|
|
2015-01-07 22:31:32 +03:00
|
|
|
}
|