Merge pull request #145401 from sternenseemann/haddock-interfaces

haskellPackages.mkDerivation: add doHaddockInterfaces option
This commit is contained in:
maralorn 2021-11-10 23:45:12 +01:00 committed by GitHub
commit d8e8bb1210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,7 @@ in
, mainProgram ? null
, doCoverage ? false
, doHaddock ? !(ghc.isHaLVM or false)
, doHaddockInterfaces ? doHaddock && lib.versionAtLeast ghc.version "9.0.1"
, passthru ? {}
, pkg-configDepends ? [], libraryPkgconfigDepends ? [], executablePkgconfigDepends ? [], testPkgconfigDepends ? [], benchmarkPkgconfigDepends ? []
, testDepends ? [], testHaskellDepends ? [], testSystemDepends ? [], testFrameworkDepends ? []
@ -226,7 +227,11 @@ let
] ++ optionals isCross ([
"--configure-option=--host=${stdenv.hostPlatform.config}"
] ++ crossCabalFlags
) ++ optionals enableSeparateBinOutput ["--bindir=${binDir}"];
) ++ optionals enableSeparateBinOutput [
"--bindir=${binDir}"
] ++ optionals (doHaddockInterfaces && isLibrary) [
"--ghc-options=-haddock"
];
setupCompileFlags = [
(optionalString (!coreSetup) "-${nativePackageDbFlag}=$setupPackageConfDir")