haskell-ng: rename "noHaddock" attribute to "doHaddock"

This makes the attribute (a) consistent with "doCheck" and friends and (b)
avoids the double negation "noHaddock = false" meaning "doHaddock = true".

Fixes https://github.com/NixOS/cabal2nix/issues/63.
This commit is contained in:
Peter Simons 2015-01-18 11:04:38 +01:00
parent 8c833f2a12
commit 380114738f
4 changed files with 8 additions and 8 deletions

View File

@ -137,8 +137,8 @@ self: super: {
version = "2.0";
src = pkgs.fetchgit {
url = "http://github.com/NixOS/cabal2nix.git";
sha256 = "c1927f7441a057f02d25cbca855f533fc8073e7680083caa86d48e3d69ab69fd";
rev = "0c4c1f2529a7e4b83ec21922d77c792a9bd1d662";
sha256 = "8e1943affa70bf664d6b306f6331bad9332ca74816078f298d4acff0921c8520";
rev = "a5db30dbd55d7b4ec5df8fa116083b786bcf81c4";
};
isLibrary = false;
isExecutable = true;

View File

@ -21,7 +21,7 @@ let
inherit (self) ghc jailbreak-cabal;
hscolour = overrideCabal self.hscolour (drv: {
isLibrary = false;
noHaddock = true;
doHaddock = false;
hyperlinkSource = false; # Avoid depending on hscolour for this build.
postFixup = "rm -rf $out/lib $out/share $out/nix-support";
});
@ -29,7 +29,7 @@ let
mkDerivation = drv: super.mkDerivation (drv // {
enableSharedExecutables = false;
enableSharedLibraries = false;
noHaddock = true;
doHaddock = false;
useCpphs = false;
});
})) (drv: {

View File

@ -27,7 +27,7 @@
, jailbreak ? false
, license
, maintainers ? []
, noHaddock ? false
, doHaddock ? true
, passthru ? {}
, pkgconfigDepends ? []
, platforms ? ghc.meta.platforms
@ -214,7 +214,7 @@ stdenv.mkDerivation ({
haddockPhase = ''
runHook preHaddock
${optionalString (!noHaddock && hasActiveLibrary) ''
${optionalString (doHaddock && hasActiveLibrary) ''
./Setup haddock --html \
${optionalString doHoogle "--hoogle"} \
${optionalString (hasActiveLibrary && hyperlinkSource) "--hyperlink-source"}

View File

@ -8,8 +8,8 @@ rec {
overrideScope = scope: overrideCabal (drv.overrideScope scope) f;
};
doHaddock = drv: overrideCabal drv (drv: { noHaddock = false; });
dontHaddock = drv: overrideCabal drv (drv: { noHaddock = true; });
doHaddock = drv: overrideCabal drv (drv: { doHaddock = true; });
dontHaddock = drv: overrideCabal drv (drv: { doHaddock = false; });
doJailbreak = drv: overrideCabal drv (drv: { jailbreak = true; });
dontJailbreak = drv: overrideCabal drv (drv: { jailbreak = false; });