depot/third_party/nixpkgs/doc/hooks/zig.section.md
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

1.1 KiB

zigHook

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software.

In Nixpkgs, zigHook overrides the default build, check and install phases.

Example code snippet

{ lib
, stdenv
, zigHook
}:

stdenv.mkDerivation {
  # . . .

  nativeBuildInputs = [
    zigHook
  ];

  zigBuildFlags = [ "-Dman-pages=true" ];

  dontUseZigCheck = true;

  # . . .
}

Variables controlling zigHook

dontUseZigBuild

Disables using zigBuildPhase.

zigBuildFlags

Controls the flags passed to the build phase.

dontUseZigCheck

Disables using zigCheckPhase.

zigCheckFlags

Controls the flags passed to the check phase.

dontUseZigInstall

Disables using zigInstallPhase.

zigInstallFlags

Controls the flags passed to the install phase.

Variables honored by zigHook

  • prefixKey
  • dontAddPrefix