Home Explore Blog Models CI



nixpkgs

doc/hooks/haredo.section.md
09e7596fe73f4b5eda133d53d0faa9d8ca8cd67bca1742d90000000300000569
# `haredo` {#haredo-hook}

This hook uses [the `haredo` command runner](https://sr.ht/~autumnull/haredo/) to build, check, and install the package. It overrides `buildPhase`, `checkPhase`, and `installPhase` by default.

The hook builds its targets in parallel if [`enableParallelBuilding`](#var-stdenv-enableParallelBuilding) is set to `true`.

## `buildPhase` {#haredo-hook-buildPhase}

This phase attempts to build the default target.

[]{#haredo-hook-haredoBuildTargets} Targets can be explicitly set by adding a string to the `haredoBuildTargets` list.

[]{#haredo-hook-dontUseHaredoBuild} This behavior can be disabled by setting `dontUseHaredoBuild` to `true`.

## `checkPhase` {#haredo-hook-checkPhase}

This phase searches for the `check.do` or `test.do` targets, running them if they exist.

[]{#haredo-hook-haredoCheckTargets} Targets can be explicitly set by adding a string to the `haredoCheckTargets` list.

[]{#haredo-hook-dontUseHaredoCheck} This behavior can be disabled by setting `dontUseHaredoCheck` to `true`.

## `installPhase` {#haredo-hook-installPhase}

This phase attempts to build the `install.do` target, if it exists.

[]{#haredo-hook-haredoInstallTargets} Targets can be explicitly set by adding a string to the `haredoInstallTargets` list.

[]{#haredo-hook-dontUseHaredoInstall} This behavior can be disabled by setting `dontUseHaredoInstall` to `true`.

Chunks
3540a18d (1st chunk of `doc/hooks/haredo.section.md`)
Title: The Haredo Hook
Summary
This document describes the `haredo` hook, which leverages the `haredo` command runner to manage package building, checking, and installation. It overrides the default `buildPhase`, `checkPhase`, and `installPhase` and supports parallel building if `enableParallelBuilding` is true. Each phase's behavior (building default targets, running `check.do`/`test.do`, or `install.do`) can be customized by specifying targets in `haredoBuildTargets`, `haredoCheckTargets`, or `haredoInstallTargets`, respectively, or disabled entirely using `dontUseHaredoBuild`, `dontUseHaredoCheck`, or `dontUseHaredoInstall`.