diff --git a/pkgs/development/compilers/zig/default.nix b/pkgs/development/compilers/zig/default.nix index e7c62a4cf938c..dd992d01c2c76 100644 --- a/pkgs/development/compilers/zig/default.nix +++ b/pkgs/development/compilers/zig/default.nix @@ -7,40 +7,17 @@ , zlib }: -let - zig_0_10_0 = fetchFromGitHub { - owner = "ziglang"; - repo = "zig"; - rev = "0.10.0"; - hash = "sha256-DNs937N7PLQimuM2anya4npYXcj6cyH+dRS7AiOX7tw="; - }; -in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "zig"; - version = "0.9.1"; + version = "0.10.0"; src = fetchFromGitHub { owner = "ziglang"; - repo = pname; - rev = version; - hash = "sha256-x2c4c9RSrNWGqEngio4ArW7dJjW0gg+8nqBwPcR721k="; + repo = "zig"; + rev = finalAttrs.version; + hash = "sha256-DNs937N7PLQimuM2anya4npYXcj6cyH+dRS7AiOX7tw="; }; - patches = [ - # Fix index out of bounds reading RPATH (cherry-picked from 0.10-dev) - ./rpath.patch - # Fix build on macOS 13 (cherry-picked from 0.10-dev) - ./ventura.patch - ]; - - # TODO: remove on next upgrade - prePatch = '' - cp -R ${zig_0_10_0}/lib/libc/include/any-macos.13-any lib/libc/include/any-macos.13-any - cp -R ${zig_0_10_0}/lib/libc/include/aarch64-macos.13-none lib/libc/include/aarch64-macos.13-gnu - cp -R ${zig_0_10_0}/lib/libc/include/x86_64-macos.13-none lib/libc/include/x86_64-macos.13-gnu - cp ${zig_0_10_0}/lib/libc/darwin/libSystem.13.tbd lib/libc/darwin/ - ''; - nativeBuildInputs = [ cmake llvmPackages.llvm.dev @@ -49,7 +26,8 @@ stdenv.mkDerivation rec { buildInputs = [ libxml2 zlib - ] ++ (with llvmPackages; [ + ] + ++ (with llvmPackages; [ libclang lld llvm @@ -75,8 +53,9 @@ stdenv.mkDerivation rec { homepage = "https://ziglang.org/"; description = "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software"; + changelog = "https://ziglang.org/download/${finalAttrs.version}/release-notes.html"; license = licenses.mit; maintainers = with maintainers; [ aiotter andrewrk AndersonTorres ]; platforms = platforms.unix; }; -} +})