: Whether to generate and install files needed for [HPC][haskell-program-coverage].
Defaults to `false`.
`doHaddock`
: Whether to build (HTML) documentation using [haddock][haddock].
Defaults to `true` if supported.
`testTargets`
: Names of the test suites to build and run. If unset, all test suites will be executed.
`preCompileBuildDriver`
: Shell code to run before compiling `Setup.hs`.
`postCompileBuildDriver`
: Shell code to run after compiling `Setup.hs`.
`preHaddock`
: Shell code to run before building documentation using haddock.
`postHaddock`
: Shell code to run after building documentation using haddock.
`coreSetup`
: Whether to only allow core libraries to be used while building `Setup.hs`.
Defaults to `false`.
`useCpphs`
: Whether to enable the [cpphs][cpphs] preprocessor. Defaults to `false`.
`enableSeparateBinOutput`
: Whether to install executables to a separate `bin` output. Defaults to `false`.
`enableSeparateDataOutput`
: Whether to install data files shipped with the package to a separate `data` output.
Defaults to `false`.
`enableSeparateDocOutput`
: Whether to install documentation to a separate `doc` output.
Is automatically enabled if `doHaddock` is `true`.
`enableSeparateIntermediatesOutput`
: When `doInstallIntermediates` is true, whether to install intermediate build
products to a separate `intermediates` output. See [“Incremental
builds”](#haskell-incremental-builds) for more information. Defaults to
`false`.
`allowInconsistentDependencies`
: If enabled, allow multiple versions of the same Haskell package in the
dependency tree at configure time. Often in such a situation compilation would
later fail because of type mismatches. Defaults to `false`.
`enableLibraryForGhci`
: Build and install a special object file for GHCi. This improves performance
when loading the library in the REPL, but requires extra build time and
disk space. Defaults to `false`.
`previousIntermediates`
: If non-null, intermediate build artifacts are copied from this input to
`dist/build` before performing compiling. See [“Incremental
builds”](#haskell-incremental-builds) for more information. Defaults to `null`.
`buildTarget`
: Name of the executable or library to build and install.
If unset, all available targets are built and installed.
### Specifying dependencies {#haskell-derivation-deps}
Since `haskellPackages.mkDerivation` is intended to be generated from cabal
files, it reflects cabal's way of specifying dependencies. For one, dependencies
are grouped by what part of the package they belong to. This helps to reduce the
dependency closure of a derivation, for example benchmark dependencies are not
included if `doBenchmark == false`.
`setup*Depends`
: dependencies necessary to compile `Setup.hs`
`library*Depends`
: dependencies of a library contained in the package
`executable*Depends`
: dependencies of an executable contained in the package
`test*Depends`
: dependencies of a test suite contained in the package
`benchmark*Depends`
: dependencies of a benchmark contained in the package
The other categorization relates to the way the package depends on the dependency:
`*ToolDepends`
: Tools we need to run as part of the build process.
They are added to the derivation's `nativeBuildInputs`.
`*HaskellDepends`
: Haskell libraries the package depends on.
They are added to `propagatedBuildInputs`.
`*SystemDepends`
: Non-Haskell libraries the package depends on.
They are added to `buildInputs`
`*PkgconfigDepends`
: `*SystemDepends` which are discovered using `pkg-config`.
They are added to `buildInputs` and it is additionally
ensured that `pkg-config` is available at build time.
`*FrameworkDepends`
: Apple SDK Framework which the package depends on when compiling it on Darwin.
Using these two distinctions, you should be able to categorize most of the dependency
specifications that are available:
`benchmarkFrameworkDepends`,
`benchmarkHaskellDepends`,
`benchmarkPkgconfigDepends`,
`benchmarkSystemDepends`,