mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
59eb02116f
Zig is still under active development, and new releases often introduce breaking changes. This makes updating the default version of zig easier. Some packages did not receive this change because they could be using the c compiler or linker of zig, which doesn't receive as much breaking changes compared to e.g. the zig std library. https://github.com/NixOS/nixpkgs/pull/248243#discussion_r1289401340
1.1 KiB
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