Commit 59eb0211 authored by figsoda's avatar figsoda Committed by Anderson Torres
Browse files

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
parent 17d404ee
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9,14 +9,14 @@ In Nixpkgs, `zig.hook` overrides the default build, check and install phases.
```nix
{ lib
, stdenv
, zig
, zig_0_11
}:

stdenv.mkDerivation {
  # . . .

  nativeBuildInputs = [
    zig.hook
    zig_0_11.hook
  ];

  zigBuildFlags = [ "-Dman-pages=true" ];
+2 −2
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, zig
, zig_0_11
, callPackage
}:

@@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: {
  };

  nativeBuildInputs = [
    zig.hook
    zig_0_11.hook
  ];

  postPatch = ''
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
, stdenv
, fetchFromGitHub
, fetchpatch
, zig
, zig_0_11
}:

stdenv.mkDerivation rec {
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
  ];

  nativeBuildInputs = [
    zig.hook
    zig_0_11.hook
  ];

  meta = with lib; {
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
, stdenv
, fetchFromGitHub
, testers
, zig
, zig_0_11
}:

stdenv.mkDerivation (finalAttrs: {
@@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-C6sG8iqXs64x2AWCxKGFPyoXC1Fn4p2eSLWwJAQ8CSc=";
  };

  nativeBuildInputs = [ zig.hook ];
  nativeBuildInputs = [ zig_0_11.hook ];

  passthru.tests.version = testers.testVersion { package = finalAttrs.dt; };