From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0FSDKqyLqWYuPQEA62LTzQ:P1 (envelope-from ) for ; Wed, 31 Jul 2024 00:56:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0FSDKqyLqWYuPQEA62LTzQ (envelope-from ) for ; Wed, 31 Jul 2024 02:56:12 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=mHhDy7mN; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=MyZGft6a; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722387372; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=p6eyrjaD1+/p7UmU/oXvlcbv99ttlnLoZZ0NWQIsDoE=; b=Cl6lYeZggnFUTbTwpRNKYklzY16mWEnYuFKcF4eoO398dq38Ty8eC9JDULoGoL3TPo18RP uX9bg8K9wxhI00NHIYfIibkVNQCbU+g3yyceqr/IzqswHlYvGdVgk56l6/gftEUK9ET3LP AjdDZ4htQY+Duob+7XuWCK0jxCltbJw7utVe0MKl8D4/othEc443TjJIlX7wdPua9Dv1aT 7D2aP8hsNZxWRylT1SW+Li6RSTiatnY/RCJ4iGQtS1VDdAIcUUN52mYkpOzFnc95AE7jrh SyW1L0k3+sH+7JXq01hfv1R6kVBXFwmAQNP1Yijqm7ouiLgZI86ShnQuyDjkrw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722387372; a=rsa-sha256; cv=none; b=WjttmWafLWfX8zJ1FN1cUKu7r/m2CkamNh2Ivh8tyBwliD9t+R5HkWFDtsAzdke07G2hsL dJUOGBTsfAzk+mEsfsxXHMeRTqMWxOVBiPdYeWLJJA8QiTNzFSKA4VRvIOrW/kI94MZC6c BW8A6KLKkts+UGBM3gD7Q7rRGg8oXSeP5vf6i6aAcCTUSJSjGg26G2LykpDrBjXUPziraQ 5QkDXea52WK1Ku+dc1U2KSsTXSslVHOcHqWWnDAbiukRb3u5aUKlNTHdjBKZb3Fo+wOgFs px4ymfGW0tuq8uLdRtq9VuataHnDrSQt3SaRfn/4t7S02bnvBRthDBsqgDraHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=mHhDy7mN; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=MyZGft6a; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3F3866F970 for ; Wed, 31 Jul 2024 02:56:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYxdJ-00081B-RE; Tue, 30 Jul 2024 20:56:02 -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 ) id 1sYvD7-0000HA-CY for guix-patches@gnu.org; Tue, 30 Jul 2024 18:20:49 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYvD7-0006rl-2N for guix-patches@gnu.org; Tue, 30 Jul 2024 18:20:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=p6eyrjaD1+/p7UmU/oXvlcbv99ttlnLoZZ0NWQIsDoE=; b=mHhDy7mNMRaIzSn+wqaLj+DEFKgp+IjsP6Aj1WQMDkIdDis09pIThK/CgtHRdqmK8ZfS+j/FLma2L8JJ9CxGEuhRO+9HhgPoTaFmibjFy2Fg1hS+rGd7yqN1T1IGlVYWQPR2h38Ffoj9nwpxS9lUM2zCEG+n7S8i0RIPXNke3A3vdn+KeU7wCMvDsZQfELb9F0IzvmI8lGUZ6z+JiCOGRz18FH/UHnTHSAQ55iJGnA3pxfdK2LRZSeHPNCzkgcJKJEyUvvLJiypQj0kwCDOVqIHFnDTSa/MAsgyBN5ylyYGx5njIAIImiKBVf1XXJ2B2x5KaXGmzhc/QejbTSo3IfQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sYvDJ-00022r-RV; Tue, 30 Jul 2024 18:21:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72386] [PATCH] gnu: zig: Update to 0.13.0. Resent-From: Guillaume Pagnoux Original-Sender: "Debbugs-submit" Resent-CC: ekaitz@elenq.tech, guix-patches@gnu.org Resent-Date: Tue, 30 Jul 2024 22:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72386 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72386@debbugs.gnu.org Cc: Guillaume Pagnoux , Ekaitz Zarraga X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Ekaitz Zarraga Received: via spool by submit@debbugs.gnu.org id=B.17223780527836 (code B ref -1); Tue, 30 Jul 2024 22:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2024 22:20:52 +0000 Received: from localhost ([127.0.0.1]:48666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYvD9-00022J-G2 for submit@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 ) id 1sYuj0-0001G8-7T for submit@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 ) id 1sYuil-0003Bp-9U for guix-patches@gnu.org; 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 ) id 1sYuij-0001kj-8s for guix-patches@gnu.org; Tue, 30 Jul 2024 17:49:26 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-369c609d0c7so3387192f8f.3 for ; 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 Date: Tue, 30 Jul 2024 23:43:55 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=gpagnoux@gmail.com; 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-Mailman-Approved-At: Tue, 30 Jul 2024 18:20:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 30 Jul 2024 20:55:59 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 3F3866F970 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.56 X-Spam-Score: -9.56 X-TUID: MIsyzRpqBf0B 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 ;;; Copyright © 2021 Calum Irwin ;;; Copyright © 2022, 2023 Efraim Flashner +;;; Copyright © 2024 Guillaume Pagnoux ;;; ;;; 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