treewide: use zig_0_11 instead of zig for zig packages

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
This commit is contained in:
figsoda 2023-08-09 20:55:18 -04:00 committed by Anderson Torres
parent 17d404ee80
commit 59eb02116f
4 changed files with 8 additions and 8 deletions

View file

@ -9,14 +9,14 @@ In Nixpkgs, `zig.hook` overrides the default build, check and install phases.
```nix ```nix
{ lib { lib
, stdenv , stdenv
, zig , zig_0_11
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
# . . . # . . .
nativeBuildInputs = [ nativeBuildInputs = [
zig.hook zig_0_11.hook
]; ];
zigBuildFlags = [ "-Dman-pages=true" ]; zigBuildFlags = [ "-Dman-pages=true" ];

View file

@ -1,7 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, zig , zig_0_11
, callPackage , callPackage
}: }:
@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: {
}; };
nativeBuildInputs = [ nativeBuildInputs = [
zig.hook zig_0_11.hook
]; ];
postPatch = '' postPatch = ''

View file

@ -2,7 +2,7 @@
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, zig , zig_0_11
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
zig.hook zig_0_11.hook
]; ];
meta = with lib; { meta = with lib; {

View file

@ -2,7 +2,7 @@
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, testers , testers
, zig , zig_0_11
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-C6sG8iqXs64x2AWCxKGFPyoXC1Fn4p2eSLWwJAQ8CSc="; hash = "sha256-C6sG8iqXs64x2AWCxKGFPyoXC1Fn4p2eSLWwJAQ8CSc=";
}; };
nativeBuildInputs = [ zig.hook ]; nativeBuildInputs = [ zig_0_11.hook ];
passthru.tests.version = testers.testVersion { package = finalAttrs.dt; }; passthru.tests.version = testers.testVersion { package = finalAttrs.dt; };