Ekaitz Zarraga <ekaitz@HIDDEN>
to control <at> debbugs.gnu.org.
Full text available.
Received: (at 72386) by debbugs.gnu.org; 30 Jul 2024 22:40:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 30 18:40:30 2024
Received: from localhost ([127.0.0.1]:48690 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1sYvW9-0002Xe-J5
for submit <at> debbugs.gnu.org; Tue, 30 Jul 2024 18:40:30 -0400
Received: from dane.soverin.net ([185.233.34.30]:59851)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <ekaitz@HIDDEN>) id 1sYvW1-0002XB-LH
for 72386 <at> debbugs.gnu.org; Tue, 30 Jul 2024 18:40:28 -0400
Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by dane.soverin.net (Postfix) with ESMTPS id 4WYVXK0Kskz2xb5;
Tue, 30 Jul 2024 22:39:29 +0000 (UTC)
Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by
soverin.net (Postfix) with ESMTPSA id 4WYVXJ3wNQzJd;
Tue, 30 Jul 2024 22:39:28 +0000 (UTC)
Authentication-Results: smtp.soverin.net; dkim=pass (2048-bit key;
unprotected) header.d=elenq.tech header.i=@elenq.tech header.a=rsa-sha256
header.s=soverin1 header.b=sN9jqFMM; dkim-atps=neutral
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=soverin1;
t=1722379168;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=nbdud1pSkW0I1IpJVX1p51qCNxzwVX/2GzMwLQ3FjPI=;
b=sN9jqFMMZv7EsMUp+b9+eg8JvlVMqXdWnhkBMXHEvfDpyEPlupDKW6Gc2s9Jo08wKEL5jH
Ok4zu8is4tGQNIxn0AKllhLXYTY44QKGGtx73SUK9hHyJYh9MHiNBT8hhU8g8Zj4ftqxOs
c9ywG3igvn5AbYM+7S+1CrEQxrcQIi3coLEUYMbV5d8ZpqAI7sxHKK2HIEvlib6veEcFQK
+OijP5bdBzgMcH0ZjIWh6zSvUv+h7Sfcbd05mwqR3wmrUfqYHmHb1qop15s9/qI4Z3QGnb
ODtHAtTDidgVYfHXD10bWGTjUUgOWt2BRi7sCSPsoXWIwZOQBk9VHG24x3XVqA==
Message-ID: <f7228a95-4d2b-7150-fd7e-33424bda2ce2@HIDDEN>
Date: Wed, 31 Jul 2024 00:39:28 +0200
MIME-Version: 1.0
Subject: Re: [bug#72386] [PATCH] gnu: zig: Update to 0.13.0.
Content-Language: en-US, es-ES, eu
To: Guillaume Pagnoux <gpagnoux@HIDDEN>, 72386 <at> debbugs.gnu.org,
Hilton Chain <hako@HIDDEN>
References: <b9885f3f12d0e72e546d95b9c6cdddd2de7a055c.1722375835.git.gpagnoux@HIDDEN>
From: Ekaitz Zarraga <ekaitz@HIDDEN>
Autocrypt: addr=ekaitz@HIDDEN; keydata=
xsFNBGViSyIBEADY3g71uW/0CVaVm5/ObqTicQXXJRuh1uafIFiUUZoAp1V3V89b3LZ/m0cL
8YNHxTxsx8sKIMYTGlOvARAMiSpDvkmpf5pLn5T7+VvK90FOv/Pkp1tNNT+tvd0m/7C58+39
s7tN+XppbjVRtFuSXY0aFe8rpivZsKxv+tPUHUnQQszXvwgx0GQl8AX99IE+j75NJmBHFVg2
0geKa7QVymu669ix2+zU8vGoOKf5nIS0qG1m/vrtwR3ZuuyWX9/E/uP95ahX5ETWtjhTDbEm
MEaRperwbczBewkdERJ34vRrverqKQA1xHXoPsx4NkLMocORFSSCJsveXcgWlU+pUIOYcKUA
ARJjHh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5Gt/ViK5nI
wl7uRQpayMc9zmI8ytUT2NJxovq1/fT9nB8VPwlbJTE9zvIqfqHh9o9Apx5o8yTaSCyGUyu9
8h/klqxFy4HAPJJu/3JkiMaCI45ZdCqRR1LIwhtmW2lb73r0rP/0S1cKi+ehA4oQvwiUw7zh
XXw7mqzSAJ0SWT92Vy2G8Z8qqgwxwfQcdFZAyJAL1rgEPQljNT91Vgbc6DCUka2XW5BqyhEB
eS0n1gK0hYXbM9FKegRsZxlmRAXa4KGXCwr4BNK6k+zkKPitezjbtcLgcKSHa8/HyHNkW7xH
R+MN16x2elQPmQ2d0Ien1HgsK98+3prlUGwZIVCqa1ddSoW0llU3JzGsKrMAiYbWg/rOXFil
RJbuhjflaLBVmfI8VlRQRocP+WEH0lsUWrtjVaGcBj1/YnIoT+zT6fPSXwPsrBvAWEjfl8HH
e1F4cYb+ugPDwUTd1s2Uj2tF0/fhCHPy9sXyx/EIL3gqyBw9M2Rz9A==
In-Reply-To: <b9885f3f12d0e72e546d95b9c6cdddd2de7a055c.1722375835.git.gpagnoux@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spampanel-Class: ham
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 72386
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
Hi,
On 2024-07-30 23:43, Guillaume Pagnoux wrote:
> Change-Id: I642c793a0183fc774b746b6ce49c7d8b7230d043
> ---
> Hi Guix,
>
> This patch updates Zig to version 0.13.0. This is my first
> contribution to Guix, and here are a few things to note:
>
> - Just like version 0.10, this version is defined as a variant of
> another version (in this case, 0.10). I made this choice since there
> are some packages that depends on zig, specifying the exact version
> of zig they want. Ideally, we should update those packages to use
> the latest version of Zig, and simplify the zig recipe by removing
> those previous versions.
> - The Zig tests are currently disabled. I could not get them to
> work. They depend on being able to link with -lrt, but I could not
> find how to provide the dependency to the tests.
>
> Cheers !
Thanks for the patch!
There's a problem though: Zig comes with some binaries (the wasm
bootstrap), which go against of the Guix policy.
Hilton Chain and myself have take a look to this very issue, trying to
bootstrap it properly, but its taking time.
About the tests, the zig package in nix, which is (I think) maintained
by the zig author, uses only the behavior tests.
I did a similar package for myself in the following link, that passes
the behavior tests:
https://git.elenq.tech/guix-packages/tree/zig.scm?id=214f27145ea93dcab99929586df3259acf77d7c9
So, yes. We are trying to add Zig. Sadly, our free-software and
no-binaries policies don't allow us to include the package just like this.
Thanks again for your contribution.
I hope we can add a modified version of it soon to Guix.
Best,
Ekaitz
> gnu/packages/zig.scm | 62 +++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 61 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
> index 6e399dfce3..a87060d4f6 100644
> --- a/gnu/packages/zig.scm
> +++ b/gnu/packages/zig.scm
> @@ -3,6 +3,7 @@
> ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
> ;;; Copyright © 2021 Calum Irwin <calumirwin1@HIDDEN>
> ;;; Copyright © 2022, 2023 Efraim Flashner <efraim@HIDDEN>
> +;;; Copyright © 2024 Guillaume Pagnoux <gpagnoux@HIDDEN>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -28,6 +29,7 @@ (define-module (gnu packages zig)
> #:use-module (guix build-system cmake)
> #:use-module (gnu packages)
> #:use-module (gnu packages compression)
> + #:use-module (gnu packages gcc)
> #:use-module (gnu packages llvm)
> #:use-module (gnu packages llvm-meta))
>
> @@ -198,4 +200,62 @@ (define-public zig-0.10
> (properties `((max-silent-time . 9600)
> ,@(clang-compiler-cpu-architectures "15")))))
>
> -(define-public zig zig-0.10)
> +(define-public zig-0.13
> + (package
> + (inherit zig-0.10)
> + (name "zig")
> + (version "0.13.0")
> +
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/ziglang/zig")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "0ly8042lbsa8019g0d1jg4l06rxpq2530n9mijq66n4lmx7a5976"))))
> +
> + (arguments
> + (substitute-keyword-arguments (package-arguments zig-0.9)
> + ((#:configure-flags flags
> + ''())
> + #~(cons* "-DZIG_TARGET_MCPU=baseline" "-DZIG_SHARED_LLVM=ON"
> + #$flags))
> +
> + ((#:tests? _ #f)
> + #f)
> +
> + ((#:phases phases
> + '%standard-phases)
> + #~(modify-phases #$phases
> + #$@(if (target-riscv64?)
> + `((delete 'adjust-tests))
> + '())
> + (add-after 'unpack 'set-CC
> + (lambda _
> + ;; Set CC, since the stage 2 zig relies on it to find the libc
> + ;; installation, and otherwise silently links against its own.
> + (setenv "CC"
> + #$(cc-for-target))))
> + (add-after 'patch-source-shebangs 'patch-more-shebangs
> + (lambda* (#:key inputs #:allow-other-keys)
> + ;; Zig uses information about /usr/bin/env to determine the
> + ;; version of glibc and other data.
> + (substitute* "lib/std/zig/system.zig"
> + (("/usr/bin/env")
> + (search-input-file inputs "/bin/env")))))))))
> +
> + (inputs (modify-inputs (package-inputs zig-0.10)
> + (prepend `(,gcc "lib"))
> + (replace "clang" clang-18)
> + (replace "lld" lld-18)))
> +
> + (native-inputs (modify-inputs (package-native-inputs zig-0.10)
> + (replace "llvm" llvm-18)))
> +
> + (properties `((max-silent-time . 9600) ,@(clang-compiler-cpu-architectures
> + "18")))))
> +
> +(define-public zig
> + zig-0.13)
>
> base-commit: 2aa0127d4e3d2363c04caab88137b070b6cf1318
> --
> 2.45.2
>
>
guix-patches@HIDDEN:bug#72386; Package guix-patches.
Full text available.
Received: (at submit) by debbugs.gnu.org; 30 Jul 2024 22:20:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 30 18:20:52 2024
Received: from localhost ([127.0.0.1]:48666 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1sYvD9-00022J-G2
for submit <at> debbugs.gnu.org; Tue, 30 Jul 2024 18:20:52 -0400
Received: from lists.gnu.org ([209.51.188.17]:37112)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <gpagnoux@HIDDEN>) id 1sYuj0-0001G8-7T
for submit <at> debbugs.gnu.org; Tue, 30 Jul 2024 17:49:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <gpagnoux@HIDDEN>)
id 1sYuil-0003Bp-9U
for guix-patches@HIDDEN; Tue, 30 Jul 2024 17:49:27 -0400
Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from <gpagnoux@HIDDEN>)
id 1sYuij-0001kj-8s
for guix-patches@HIDDEN; Tue, 30 Jul 2024 17:49:26 -0400
Received: by mail-wr1-x435.google.com with SMTP id
ffacd0b85a97d-369c609d0c7so3387192f8f.3
for <guix-patches@HIDDEN>; Tue, 30 Jul 2024 14:49:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1722376163; x=1722980963; darn=gnu.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=p6eyrjaD1+/p7UmU/oXvlcbv99ttlnLoZZ0NWQIsDoE=;
b=MyZGft6a0G+Nv8O3YgXJp5FsC6CSqsBLlikuZjY8Al40vTTYrX8BGE3Sak2hbTxMc8
Bl3zK1ACDelfWOyDHiLsMGvRyC/O+Ngm2JPyo8OS8RrPsSpu9gh8nt30kiH4b/11m4fj
o+YTZwpdTQdNYm5H4yWv3K/ooI2O+1UR24YJjfwC6s7awmRW7GV53W0wysc9b5fbE8K2
S+Y6cWGQbmffW1bRpr2o1lrNifzgSIbo+eXrKpoTyTYPtLslj34dJzOMg/JEOBaaIXDx
glM1fPGt70itGZ9fYgnb2DZa2ne3yuOl9v6Tlituj/Te8p7lHfEntbL3FkySVsb+GHij
2S4w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1722376163; x=1722980963;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=p6eyrjaD1+/p7UmU/oXvlcbv99ttlnLoZZ0NWQIsDoE=;
b=U08Bry1QcsJJRUahroxv5jQDj5yW7Yyp9eO+yZZJeaZplq/RuKtyRMm+4A99feP3iA
SSjr6+D3Rw/9ngRkyF85Kw5XRRbKx33c9S+DPvzuSGUpTLZnE+dPpiATy6IcmezYoImM
B+IW6qLC4swNlRqBwMWAts4XHo/Lojdvdk9sgWBlo63TQU5R1ZK6abrMBDgEKbyqLFFf
ek7O11hX6ylfRSyJUWoV0d62Q0LCRkgwzWJ9u5/ZQdj/cD3SYgzLHkF3RDLqjQza5Qtx
VLDPPBUjdpqic6IUI64JorUCiHZRGZcMDmi+LuvqB1DyfCUDc9LmVMLa3SU/trhc0MDD
SziA==
X-Gm-Message-State: AOJu0YyeBV537Qyu+rAMWvFcUQpBLaDKUd08eUP2o2lJEfjun1Me9wOO
nXeLftd4qwVLvKF6fYgkRxX8aS9PwLiLFpv31SMI3ooHi3zSdOet8T+VDA==
X-Google-Smtp-Source: AGHT+IFjFtsw7QPpfaYi/aYw42QmXJsyxnse3ZxlYZsD+xMiEg9ykvCezxvotZSo2JBnqLpfjr72JA==
X-Received: by 2002:adf:9b8c:0:b0:368:37aa:50be with SMTP id
ffacd0b85a97d-36b5d2c9ef7mr8829331f8f.52.1722376162307;
Tue, 30 Jul 2024 14:49:22 -0700 (PDT)
Received: from localhost.localdomain ([2a01:e0a:b98:9730:da5e:d3ff:fe32:ca5])
by smtp.gmail.com with ESMTPSA id
ffacd0b85a97d-36b368622c3sm15533479f8f.100.2024.07.30.14.49.21
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 30 Jul 2024 14:49:21 -0700 (PDT)
From: Guillaume Pagnoux <gpagnoux@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: zig: Update to 0.13.0.
Date: Tue, 30 Jul 2024 23:43:55 +0200
Message-ID: <b9885f3f12d0e72e546d95b9c6cdddd2de7a055c.1722375835.git.gpagnoux@HIDDEN>
X-Mailer: git-send-email 2.45.2
MIME-Version: 1.0
X-Debbugs-Cc: Ekaitz Zarraga <ekaitz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::435;
envelope-from=gpagnoux@HIDDEN; helo=mail-wr1-x435.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 30 Jul 2024 18:20:50 -0400
Cc: Guillaume Pagnoux <gpagnoux@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)
Change-Id: I642c793a0183fc774b746b6ce49c7d8b7230d043
---
Hi Guix,
This patch updates Zig to version 0.13.0. This is my first
contribution to Guix, and here are a few things to note:
- Just like version 0.10, this version is defined as a variant of
another version (in this case, 0.10). I made this choice since there
are some packages that depends on zig, specifying the exact version
of zig they want. Ideally, we should update those packages to use
the latest version of Zig, and simplify the zig recipe by removing
those previous versions.
- The Zig tests are currently disabled. I could not get them to
work. They depend on being able to link with -lrt, but I could not
find how to provide the dependency to the tests.
Cheers !
gnu/packages/zig.scm | 62 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 61 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
index 6e399dfce3..a87060d4f6 100644
--- a/gnu/packages/zig.scm
+++ b/gnu/packages/zig.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
;;; Copyright © 2021 Calum Irwin <calumirwin1@HIDDEN>
;;; Copyright © 2022, 2023 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright © 2024 Guillaume Pagnoux <gpagnoux@HIDDEN>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +29,7 @@ (define-module (gnu packages zig)
#:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages llvm)
#:use-module (gnu packages llvm-meta))
@@ -198,4 +200,62 @@ (define-public zig-0.10
(properties `((max-silent-time . 9600)
,@(clang-compiler-cpu-architectures "15")))))
-(define-public zig zig-0.10)
+(define-public zig-0.13
+ (package
+ (inherit zig-0.10)
+ (name "zig")
+ (version "0.13.0")
+
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ziglang/zig")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ly8042lbsa8019g0d1jg4l06rxpq2530n9mijq66n4lmx7a5976"))))
+
+ (arguments
+ (substitute-keyword-arguments (package-arguments zig-0.9)
+ ((#:configure-flags flags
+ ''())
+ #~(cons* "-DZIG_TARGET_MCPU=baseline" "-DZIG_SHARED_LLVM=ON"
+ #$flags))
+
+ ((#:tests? _ #f)
+ #f)
+
+ ((#:phases phases
+ '%standard-phases)
+ #~(modify-phases #$phases
+ #$@(if (target-riscv64?)
+ `((delete 'adjust-tests))
+ '())
+ (add-after 'unpack 'set-CC
+ (lambda _
+ ;; Set CC, since the stage 2 zig relies on it to find the libc
+ ;; installation, and otherwise silently links against its own.
+ (setenv "CC"
+ #$(cc-for-target))))
+ (add-after 'patch-source-shebangs 'patch-more-shebangs
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Zig uses information about /usr/bin/env to determine the
+ ;; version of glibc and other data.
+ (substitute* "lib/std/zig/system.zig"
+ (("/usr/bin/env")
+ (search-input-file inputs "/bin/env")))))))))
+
+ (inputs (modify-inputs (package-inputs zig-0.10)
+ (prepend `(,gcc "lib"))
+ (replace "clang" clang-18)
+ (replace "lld" lld-18)))
+
+ (native-inputs (modify-inputs (package-native-inputs zig-0.10)
+ (replace "llvm" llvm-18)))
+
+ (properties `((max-silent-time . 9600) ,@(clang-compiler-cpu-architectures
+ "18")))))
+
+(define-public zig
+ zig-0.13)
base-commit: 2aa0127d4e3d2363c04caab88137b070b6cf1318
--
2.45.2
Guillaume Pagnoux <gpagnoux@HIDDEN>:ekaitz@HIDDEN, guix-patches@HIDDEN.
Full text available.ekaitz@HIDDEN, guix-patches@HIDDEN:bug#72386; Package guix-patches.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.