From patchwork Wed Jan 19 08:11:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Calum Irwin X-Patchwork-Id: 36600 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 74B1127BBEA; Tue, 18 Jan 2022 19:56:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6C24127BBE9 for ; Tue, 18 Jan 2022 19:56:28 +0000 (GMT) Received: from localhost ([::1]:36376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9uah-0006Rp-KE for patchwork@mira.cbaines.net; Tue, 18 Jan 2022 14:56:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9tti-0008Q1-Oj for guix-patches@gnu.org; Tue, 18 Jan 2022 14:12:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9tti-0006oO-Cm for guix-patches@gnu.org; Tue, 18 Jan 2022 14:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n9tti-0002CQ-2E for guix-patches@gnu.org; Tue, 18 Jan 2022 14:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53350] [PATCH] gnu: zig: Update to 0.9.0 Resent-From: Calum Irwin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Jan 2022 19:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53350 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53350@debbugs.gnu.org Cc: Calum Irwin X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16425331218449 (code B ref -1); Tue, 18 Jan 2022 19:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2022 19:12:01 +0000 Received: from localhost ([127.0.0.1]:51725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ttg-0002C9-JX for submit@debbugs.gnu.org; Tue, 18 Jan 2022 14:12:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:37768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ttc-0002By-GO for submit@debbugs.gnu.org; Tue, 18 Jan 2022 14:11:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9ttb-0008Dk-Rq for guix-patches@gnu.org; Tue, 18 Jan 2022 14:11:56 -0500 Received: from [2607:f8b0:4864:20::1030] (port=45664 helo=mail-pj1-x1030.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9ttZ-0006o1-L9 for guix-patches@gnu.org; Tue, 18 Jan 2022 14:11:55 -0500 Received: by mail-pj1-x1030.google.com with SMTP id g9-20020a17090a67c900b001b4f1d71e4fso212027pjm.4 for ; Tue, 18 Jan 2022 11:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F55QbR6sUXlKc2DK5t2UlMkg+SMjigLI/jwmPZJJum4=; b=nmfLh56O424h3MaQ6U+si+t/7bLDrJQkZ6TvMhW2vHGOx0bGys170QI+5RXidbDGFl JRosU3zkcDH8yMYQ3raKPfpeJ5zn3pqGoIOgbNg+6/d+p0lYKec3Luh0OUXWVr+gA28X 5h/bw36GEzQefo1o8zoJiLGWxhFvj4DcMr8TFWMi/+MRTql3Vq30FUI96RFvCQqE/U+s nBpq8p9mqz7EGpo821SftPE7EDeKNVa+TuETuy1ZE/BaMjnzJPz0YZ21sdva0xnFqL8y ePLTkm7s7TTM3i2/Xnbvs1PpgGSQ5e7IEm2/L3LVKNoAcjC0PMoYeHOQCaohWbE64Xzz MnEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F55QbR6sUXlKc2DK5t2UlMkg+SMjigLI/jwmPZJJum4=; b=wwFaDmMkt77TL3EmvE2XqEntBNc5osWLETwkO3jd2YcXJb4ajyObpI63ZGAZrN+YRS mxa7Ep2JA+M+zrQTBZD76ek5/HRSpxG8TZIRL6izqc/EX+VvFOoxC+SVeaYD47W1pzYX tgiuXvA0HI/MdQ9rtnbYVb9awrxNXgC9//PsxSulyskFprKmeStfESqlo9OgUHVLA8hP OCeBnynkZ82Z03POzOIg4fOMtM3sSFRMkrgAdeKYHLRnJxKky19TzmHw47ItdX8UqvxR C7qB3Xln6e+aQ9J6dblkveFkg7orhowWrE+aGF9bizoUoPNgFwiJt8T90fd8oz3Gqf7H qasA== X-Gm-Message-State: AOAM530cd87JIbFEhH14uvAnpFZnSbekPY0YUtQ+QogZFzQ/MWxH8UiZ R1fsIViTgWs8vj7hYirshIJoTp5KpNj2ng== X-Google-Smtp-Source: ABdhPJyvAtZnqFGG69kzC8a+DFVdxOvGAAcknoD2pi99fQz7Mc1GuQUroVwQct/0bnOERrJ1ozsXMg== X-Received: by 2002:a17:902:b202:b0:149:9a8a:f93b with SMTP id t2-20020a170902b20200b001499a8af93bmr27699795plr.127.1642533111239; Tue, 18 Jan 2022 11:11:51 -0800 (PST) Received: from localhost.localdomain (122-61-174-236-fibre.sparkbb.co.nz. [122.61.174.236]) by smtp.googlemail.com with ESMTPSA id r11sm19144246pff.81.2022.01.18.11.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 11:11:50 -0800 (PST) From: Calum Irwin Date: Wed, 19 Jan 2022 08:11:25 +0000 Message-Id: <20220119081125.2487-1-calumirwin1@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1030 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=calumirwin1@gmail.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: 21 X-Spam_score: 2.1 X-Spam_bar: ++ X-Spam_report: (2.1 / 5.0 requ) BAYES_00=-1.9, DATE_IN_FUTURE_12_24=3.199, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/zig-disable-libc-note-test.patch: Move patch changes to new file. * gnu/packages/patches/zig-use-system-paths.patch: Update line numbers. * gnu/packages/zig.scm: Update to 0.9.0 --- .../patches/zig-disable-libc-note-test.patch | 32 +-- .../patches/zig-use-system-paths.patch | 261 +++++++++--------- gnu/packages/zig.scm | 11 +- 3 files changed, 152 insertions(+), 152 deletions(-) diff --git a/gnu/packages/patches/zig-disable-libc-note-test.patch b/gnu/packages/patches/zig-disable-libc-note-test.patch index 4d76139efb..b2c57cb571 100644 --- a/gnu/packages/patches/zig-disable-libc-note-test.patch +++ b/gnu/packages/patches/zig-disable-libc-note-test.patch @@ -1,14 +1,12 @@ -This test fails with "error.CompilationIncorrectlySucceeded". - diff --git a/test/compile_errors.zig b/test/compile_errors.zig -index fd1255c..20d5548 100644 +index b1eaa0302..621f9db0a 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig -@@ -2751,15 +2751,15 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { +@@ -2943,15 +2943,15 @@ pub fn addCases(ctx: *TestContext) !void { "tmp.zig:3:5: error: dependency on libc must be explicitly specified in the build command", }); - -- cases.addTest("libc headers note", + +- ctx.testErrStage1("libc headers note", - \\const c = @cImport(@cInclude("stdio.h")); - \\export fn entry() void { - \\ _ = c.printf("hello, world!\n"); @@ -17,15 +15,15 @@ index fd1255c..20d5548 100644 - "tmp.zig:1:11: error: C import failed", - "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", - }); -+// cases.addTest("libc headers note", -+// \\const c = @cImport(@cInclude("stdio.h")); -+// \\export fn entry() void { -+// \\ _ = c.printf("hello, world!\n"); -+// \\} -+// , &[_][]const u8{ -+// "tmp.zig:1:11: error: C import failed", -+// "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", -+// }); ++ // ctx.testErrStage1("libc headers note", ++ // \\const c = @cImport(@cInclude("stdio.h")); ++ // \\export fn entry() void { ++ // \\ _ = c.printf("hello, world!\n"); ++ // \\} ++ // , &[_][]const u8{ ++ // "tmp.zig:1:11: error: C import failed", ++ // "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", ++ // }); } - - cases.addTest("comptime vector overflow shows the index", + + ctx.testErrStage1("comptime vector overflow shows the index", diff --git a/gnu/packages/patches/zig-use-system-paths.patch b/gnu/packages/patches/zig-use-system-paths.patch index 33b7da1e0d..0a3cbb0e92 100644 --- a/gnu/packages/patches/zig-use-system-paths.patch +++ b/gnu/packages/patches/zig-use-system-paths.patch @@ -1,143 +1,144 @@ -This patch replaces the OS-specific detection mechanism by one that solely -relies on environment variables. This has the benefit that said environment -variables can be used as search paths in Guix. - -Index: zig-0.8.1/lib/std/zig/system.zig -=================================================================== ---- zig-0.8.1.orig/lib/std/zig/system.zig -+++ zig-0.8.1/lib/std/zig/system.zig -@@ -39,101 +39,57 @@ pub const NativePaths = struct { - }; - errdefer self.deinit(); - -- var is_nix = false; -- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |nix_cflags_compile| { -- defer allocator.free(nix_cflags_compile); +diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig +index 8e3e46e48..1ed9d3206 100644 +--- a/lib/std/zig/system/NativePaths.zig ++++ b/lib/std/zig/system/NativePaths.zig +@@ -26,73 +26,42 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths + }; + errdefer self.deinit(); + +- var is_nix = false; +- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |nix_cflags_compile| { +- defer allocator.free(nix_cflags_compile); - -- is_nix = true; -- var it = mem.tokenize(nix_cflags_compile, " "); -+ // TODO: Support cross-compile paths? -+ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_include_path| { -+ defer allocator.free(c_include_path); -+ var it = mem.tokenize(c_include_path, ":"); - while (true) { -- const word = it.next() orelse break; -- if (mem.eql(u8, word, "-isystem")) { -- const include_path = it.next() orelse { -- try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE"); -- break; -- }; -- try self.addIncludeDir(include_path); -- } else { -- if (mem.startsWith(u8, word, "-frandom-seed=")) { -- continue; -- } -- try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word}); +- is_nix = true; +- var it = mem.tokenize(u8, nix_cflags_compile, " "); ++ // TODO: Support cross-compile paths? ++ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_include_path| { ++ defer allocator.free(c_include_path); ++ var it = mem.tokenize(u8, c_include_path, ":"); + while (true) { +- const word = it.next() orelse break; +- if (mem.eql(u8, word, "-isystem")) { +- const include_path = it.next() orelse { +- try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE"); +- break; +- }; +- try self.addIncludeDir(include_path); +- } else { +- if (mem.startsWith(u8, word, "-frandom-seed=")) { +- continue; - } -+ const dir = it.next() orelse break; -+ try self.addIncludeDir(dir); - } - } else |err| switch (err) { - error.InvalidUtf8 => {}, - error.EnvironmentVariableNotFound => {}, - error.OutOfMemory => |e| return e, +- try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word}); +- } ++ const dir = it.next() orelse break; ++ try self.addIncludeDir(dir); } -- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldflags| { -- defer allocator.free(nix_ldflags); - -- is_nix = true; -- var it = mem.tokenize(nix_ldflags, " "); -+ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |cplus_include_path| { -+ defer allocator.free(cplus_include_path); -+ var it = mem.tokenize(cplus_include_path, ":"); - while (true) { -- const word = it.next() orelse break; -- if (mem.eql(u8, word, "-rpath")) { -- const rpath = it.next() orelse { -- try self.addWarning("Expected argument after -rpath in NIX_LDFLAGS"); -- break; -- }; -- try self.addRPath(rpath); -- } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') { -- const lib_path = word[2..]; -- try self.addLibDir(lib_path); -- } else { -- try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word}); + } else |err| switch (err) { + error.InvalidUtf8 => {}, + error.EnvironmentVariableNotFound => {}, + error.OutOfMemory => |e| return e, + } +- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldflags| { +- defer allocator.free(nix_ldflags); +- +- is_nix = true; +- var it = mem.tokenize(u8, nix_ldflags, " "); ++ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |cplus_include_path| { ++ defer allocator.free(cplus_include_path); ++ var it = mem.tokenize(u8, cplus_include_path, ":"); + while (true) { +- const word = it.next() orelse break; +- if (mem.eql(u8, word, "-rpath")) { +- const rpath = it.next() orelse { +- try self.addWarning("Expected argument after -rpath in NIX_LDFLAGS"); - break; -- } -+ const dir = it.next() orelse break; -+ try self.addIncludeDir(dir); - } - } else |err| switch (err) { - error.InvalidUtf8 => {}, - error.EnvironmentVariableNotFound => {}, - error.OutOfMemory => |e| return e, +- }; +- try self.addRPath(rpath); +- } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') { +- const lib_path = word[2..]; +- try self.addLibDir(lib_path); +- } else { +- try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word}); +- break; +- } ++ const dir = it.next() orelse break; ++ try self.addIncludeDir(dir); } -- if (is_nix) { -- return self; -- } + } else |err| switch (err) { + error.InvalidUtf8 => {}, + error.EnvironmentVariableNotFound => {}, + error.OutOfMemory => |e| return e, + } +- if (is_nix) { +- return self; +- } - -- if (comptime Target.current.isDarwin()) { -- try self.addIncludeDir("/usr/include"); -- try self.addIncludeDir("/usr/local/include"); - -- try self.addLibDir("/usr/lib"); -- try self.addLibDir("/usr/local/lib"); +- if (comptime builtin.target.isDarwin()) { +- try self.addIncludeDir("/usr/include"); +- try self.addIncludeDir("/usr/local/include"); - -- try self.addFrameworkDir("/Library/Frameworks"); -- try self.addFrameworkDir("/System/Library/Frameworks"); +- try self.addLibDir("/usr/lib"); +- try self.addLibDir("/usr/local/lib"); - -- return self; -+ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library_path| { -+ defer allocator.free(library_path); -+ var it = mem.tokenize(library_path, ":"); -+ while (true) { -+ const dir = it.next() orelse break; -+ try self.addLibDir(dir); -+ } -+ } else |err| switch (err) { -+ error.InvalidUtf8 => {}, -+ error.EnvironmentVariableNotFound => {}, -+ error.OutOfMemory => |e| return e, - } - -- if (native_target.os.tag != .windows) { -- const triple = try native_target.linuxTriple(allocator); -- const qual = native_target.cpu.arch.ptrBitWidth(); +- try self.addFrameworkDir("/Library/Frameworks"); +- try self.addFrameworkDir("/System/Library/Frameworks"); - -- // TODO: $ ld --verbose | grep SEARCH_DIR -- // the output contains some paths that end with lib64, maybe include them too? -- // TODO: what is the best possible order of things? -- // TODO: some of these are suspect and should only be added on some systems. audit needed. +- return self; ++ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library_path| { ++ defer allocator.free(library_path); ++ var it = mem.tokenize(u8, library_path, ":"); ++ while (true) { ++ const dir = it.next() orelse break; ++ try self.addLibDir(dir); ++ } ++ } else |err| switch (err) { ++ error.InvalidUtf8 => {}, ++ error.EnvironmentVariableNotFound => {}, ++ error.OutOfMemory => |e| return e, + } + + if (comptime native_target.os.tag == .solaris) { +@@ -106,32 +75,17 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths + return self; + } + +- if (native_target.os.tag != .windows) { +- const triple = try native_target.linuxTriple(allocator); +- const qual = native_target.cpu.arch.ptrBitWidth(); - -- try self.addIncludeDir("/usr/local/include"); -- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); -- try self.addLibDir("/usr/local/lib"); +- // TODO: $ ld --verbose | grep SEARCH_DIR +- // the output contains some paths that end with lib64, maybe include them too? +- // TODO: what is the best possible order of things? +- // TODO: some of these are suspect and should only be added on some systems. audit needed. - -- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); -- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); +- try self.addIncludeDir("/usr/local/include"); +- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); +- try self.addLibDir("/usr/local/lib"); - -- try self.addIncludeDir("/usr/include"); -- try self.addLibDirFmt("/lib{d}", .{qual}); -- try self.addLibDir("/lib"); -- try self.addLibDirFmt("/usr/lib{d}", .{qual}); -- try self.addLibDir("/usr/lib"); +- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); +- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); - -- // example: on a 64-bit debian-based linux distro, with zlib installed from apt: -- // zlib.h is in /usr/include (added above) -- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) -- try self.addLibDirFmt("/lib/{s}", .{triple}); -+ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |dyld_framework_path| { -+ defer allocator.free(dyld_framework_path); -+ var it = mem.tokenize(dyld_framework_path, ":"); -+ while (true) { -+ const dir = it.next() orelse break; -+ try self.addFrameworkDir(dir); -+ } -+ } else |err| switch (err) { -+ error.InvalidUtf8 => {}, -+ error.EnvironmentVariableNotFound => {}, -+ error.OutOfMemory => |e| return e, - } - - return self; +- try self.addIncludeDir("/usr/include"); +- try self.addLibDirFmt("/lib{d}", .{qual}); +- try self.addLibDir("/lib"); +- try self.addLibDirFmt("/usr/lib{d}", .{qual}); +- try self.addLibDir("/usr/lib"); +- +- // example: on a 64-bit debian-based linux distro, with zlib installed from apt: +- // zlib.h is in /usr/include (added above) +- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) +- try self.addLibDirFmt("/lib/{s}", .{triple}); ++ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |dyld_framework_path| { ++ defer allocator.free(dyld_framework_path); ++ var it = mem.tokenize(u8, dyld_framework_path, ":"); ++ while (true) { ++ const dir = it.next() orelse break; ++ try self.addFrameworkDir(dir); ++ } ++ } else |err| switch (err) { ++ error.InvalidUtf8 => {}, ++ error.EnvironmentVariableNotFound => {}, ++ error.OutOfMemory => |e| return e, + } + + return self; diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm index 9cd869389b..b3de72226b 100644 --- a/gnu/packages/zig.scm +++ b/gnu/packages/zig.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Liliana Marie Prikler ;;; Copyright © 2021 Sarah Morgensen +;;; Copyright © 2021 Calum Irwin ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,7 +29,7 @@ (define-module (gnu packages zig) (define-public zig (package (name "zig") - (version "0.8.1") + (version "0.9.0") (source (origin (method git-fetch) @@ -37,18 +38,18 @@ (define-public zig (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "147qx7xgj0r353wh5ragzn6kmm1vrf31i8038z3zqwjnqqgqxi6c")) + (base32 "1zdz5s434c48z3y0c8l9wm2z1gxa7yyzd53zmr68lwj6mcl7by8x")) (patches (search-patches "zig-disable-libc-note-test.patch" "zig-use-system-paths.patch")))) (build-system cmake-build-system) (inputs - (list clang-12 ; Clang propagates llvm. - lld-12)) + (list clang-13 ; Clang propagates llvm. + lld)) ;; Zig compiles fine with GCC, but also needs native LLVM libraries. (native-inputs - (list llvm-12)) + (list llvm-13)) (arguments `(#:configure-flags (list ,@(if (%current-target-system)