depot/third_party/nixpkgs/doc/hooks/zig.section.md
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

1.1 KiB

zig.hook

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

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

Example code snippet

{ lib
, stdenv
, zig_0_11
}:

stdenv.mkDerivation {
  # . . .

  nativeBuildInputs = [
    zig_0_11.hook
  ];

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

  dontUseZigCheck = true;

  # . . .
}

Variables controlling zig.hook

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 zig.hook

  • prefixKey
  • dontAddPrefix