diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-07-15 02:55:32 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-01 10:08:55 +0000 |
commit | 130d2fa5e54a882ddd22ce8856c8aa81aee1040e (patch) | |
tree | f07c9dafc28f27ef90c776e89048878f29d904db /doc/hooks | |
parent | 9d9af3d49f42f3b45478783bb528dd1c525e14cc (diff) |
doc/hooks/index.md: add zig.section.md
A somewhat short documentation about zigHook.
Diffstat (limited to 'doc/hooks')
-rw-r--r-- | doc/hooks/index.md | 1 | ||||
-rw-r--r-- | doc/hooks/zig.section.md | 59 |
2 files changed, 60 insertions, 0 deletions
diff --git a/doc/hooks/index.md b/doc/hooks/index.md index c1e86a3033073..602febaf9d9ba 100644 --- a/doc/hooks/index.md +++ b/doc/hooks/index.md @@ -29,5 +29,6 @@ tetex-tex-live.section.md unzip.section.md validatePkgConfig.section.md waf.section.md +zig.section.md xcbuild.section.md ``` diff --git a/doc/hooks/zig.section.md b/doc/hooks/zig.section.md new file mode 100644 index 0000000000000..78b8262f4749d --- /dev/null +++ b/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` |