about summary refs log tree commit diff
path: root/nixpkgs/doc/hooks/zig.section.md
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/doc/hooks/zig.section.md')
-rw-r--r--nixpkgs/doc/hooks/zig.section.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/nixpkgs/doc/hooks/zig.section.md b/nixpkgs/doc/hooks/zig.section.md
new file mode 100644
index 000000000000..78b8262f4749
--- /dev/null
+++ b/nixpkgs/doc/hooks/zig.section.md
@@ -0,0 +1,59 @@
+# zigHook {#zighook}
+
+[Zig](https://ziglang.org/) 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 {#example-code-snippet}
+
+```nix
+{ lib
+, stdenv
+, zigHook
+}:
+
+stdenv.mkDerivation {
+  # . . .
+
+  nativeBuildInputs = [
+    zigHook
+  ];
+
+  zigBuildFlags = [ "-Dman-pages=true" ];
+
+  dontUseZigCheck = true;
+
+  # . . .
+}
+```
+
+## Variables controlling zigHook {#variables-controlling-zighook}
+
+### `dontUseZigBuild` {#dontUseZigBuild}
+
+Disables using `zigBuildPhase`.
+
+### `zigBuildFlags` {#zigBuildFlags}
+
+Controls the flags passed to the build phase.
+
+### `dontUseZigCheck` {#dontUseZigCheck}
+
+Disables using `zigCheckPhase`.
+
+### `zigCheckFlags` {#zigCheckFlags}
+
+Controls the flags passed to the check phase.
+
+### `dontUseZigInstall` {#dontUseZigInstall}
+
+Disables using `zigInstallPhase`.
+
+### `zigInstallFlags` {#zigInstallFlags}
+
+Controls the flags passed to the install phase.
+
+### Variables honored by zigHook {#variablesHonoredByZigHook}
+
+- `prefixKey`
+- `dontAddPrefix`