Home Explore Blog CI



nixpkgs

15th chunk of `doc/languages-frameworks/haskell.section.md`
16a1ff15b52755d035a54d73f176f527a2b8207ce298db300000000100000fb7
`dontJailbreak drv`
: Sets the `jailbreak` argument to `false` for `drv`.

`doHaddock drv`
: Sets `doHaddock` to `true` for `drv`.

`dontHaddock drv`
: Sets `doHaddock` to `false` for `drv`. Useful if the build of a package is
failing because of e.g. a syntax error in the Haddock documentation.

`doHyperlinkSource drv`
: Sets `hyperlinkSource` to `true` for `drv`.

`dontHyperlinkSource drv`
: Sets `hyperlinkSource` to `false` for `drv`.

`doCheck drv`
: Sets `doCheck` to `true` for `drv`.

`dontCheck drv`
: Sets `doCheck` to `false` for `drv`. Useful if a package has a broken,
flaky or otherwise problematic test suite breaking the build.

`dontCheckIf condition drv`
: Sets `doCheck` to `false` for `drv`, but only if `condition` applies.
Otherwise it's a no-op. Useful to conditionally disable tests for a package
without interfering with previous overrides or default values.

<!-- Purposefully omitting the non-list variants here. They are a bit
ugly, and we may want to deprecate them at some point. -->

`appendConfigureFlags list drv`
: Adds the strings in `list` to the `configureFlags` argument for `drv`.

`enableCabalFlag flag drv`
: Makes sure that the Cabal flag `flag` is enabled in Cabal's configure step.

`disableCabalFlag flag drv`
: Makes sure that the Cabal flag `flag` is disabled in Cabal's configure step.

`appendBuildFlags list drv`
: Adds the strings in `list` to the `buildFlags` argument for `drv`.

<!-- TODO(@sternenseemann): removeConfigureFlag -->

`appendPatches list drv`
: Adds the `list` of derivations or paths to the `patches` argument for `drv`.

<!-- TODO(@sternenseemann): link dep section -->

`addBuildTools list drv`
: Adds the `list` of derivations to the `buildTools` argument for `drv`.

`addExtraLibraries list drv`
: Adds the `list` of derivations to the `extraLibraries` argument for `drv`.

`addBuildDepends list drv`
: Adds the `list` of derivations to the `buildDepends` argument for `drv`.

`addTestToolDepends list drv`
: Adds the `list` of derivations to the `testToolDepends` argument for `drv`.

`addPkgconfigDepends list drv`
: Adds the `list` of derivations to the `pkg-configDepends` argument for `drv`.

`addSetupDepends list drv`
: Adds the `list` of derivations to the `setupHaskellDepends` argument for `drv`.

`doBenchmark drv`
: Set `doBenchmark` to `true` for `drv`. Useful if your development
environment is missing the dependencies necessary for compiling the
benchmark component.

`dontBenchmark drv`
: Set `doBenchmark` to `false` for `drv`.

`setBuildTargets drv list`
: Sets the `buildTarget` argument for `drv` so that the targets specified in `list` are built.

`doCoverage drv`
: Sets the `doCoverage` argument to `true` for `drv`.

`dontCoverage drv`
: Sets the `doCoverage` argument to `false` for `drv`.

`enableExecutableProfiling drv`
: Sets the `enableExecutableProfiling` argument to `true` for `drv`.

`disableExecutableProfiling drv`
: Sets the `enableExecutableProfiling` argument to `false` for `drv`.

`enableLibraryProfiling drv`
: Sets the `enableLibraryProfiling` argument to `true` for `drv`.

`disableLibraryProfiling drv`
: Sets the `enableLibraryProfiling` argument to `false` for `drv`.

`disableParallelBuilding drv`
: Sets the `enableParallelBuilding` argument to `false` for `drv`.

#### Library functions in the Haskell package sets {#haskell-package-set-lib-functions}

Some library functions depend on packages from the Haskell package sets. Thus they are
exposed from those instead of from `haskell.lib.compose` which can only access what is
passed directly to it. When using the functions below, make sure that you are obtaining them
from the same package set (`haskellPackages`, `haskell.packages.ghc944` etc.) as the packages
you are working with or – even better – from the `self`/`final` fix point of your overlay to
`haskellPackages`.

Note: Some functions like `shellFor` that are not intended for overriding per se, are omitted
in this section. <!-- TODO(@sternenseemann): note about ifd section -->

Title: Haskell Derivation Helpers: Flags, Dependencies, Profiling and Package Set Lib Functions
Summary
This section describes various Haskell derivation helpers. It covers setting boolean flags for jailbreaking, Haddock generation, source code hyperlinking, and running checks. It also covers appending configure and build flags, enabling/disabling Cabal flags, appending patches, adding build tools and dependencies, and managing benchmark and coverage settings. Additionally, it includes functions for enabling/disabling executable and library profiling, disabling parallel building, and setting specific build targets. Finally, it introduces library functions from the Haskell package sets, which must be obtained from the same package set as the packages being worked with.