From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gKVtJiWhN2HUQQAAgWs5BA (envelope-from ) for ; Tue, 07 Sep 2021 19:28:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wEAeIiWhN2GKWQAA1q6Kng (envelope-from ) for ; Tue, 07 Sep 2021 17:28:05 +0000 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 CCBF13BA1 for ; Tue, 7 Sep 2021 19:28:04 +0200 (CEST) Received: from localhost ([::1]:54538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNet9-0002Q9-W8 for larch@yhetil.org; Tue, 07 Sep 2021 13:28:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNVCA-0006Ed-Hw for guix-patches@gnu.org; Tue, 07 Sep 2021 03:07:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNVCA-0008CW-AP for guix-patches@gnu.org; Tue, 07 Sep 2021 03:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNVCA-0007v6-2U for guix-patches@gnu.org; Tue, 07 Sep 2021 03:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50449] [PATCH] Add zig Resent-From: Andrew Patterson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Sep 2021 07:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50449 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50449@debbugs.gnu.org Cc: Andrew Patterson X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163099841130426 (code B ref -1); Tue, 07 Sep 2021 07:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Sep 2021 07:06:51 +0000 Received: from localhost ([127.0.0.1]:55327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNVBy-0007uf-W0 for submit@debbugs.gnu.org; Tue, 07 Sep 2021 03:06:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:55278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNTZY-0002vz-L5 for submit@debbugs.gnu.org; Tue, 07 Sep 2021 01:23:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNTZY-0008VC-FJ for guix-patches@gnu.org; Tue, 07 Sep 2021 01:23:04 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:44563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNTZU-0004HJ-0z for guix-patches@gnu.org; Tue, 07 Sep 2021 01:23:01 -0400 Received: by mail-qt1-x82d.google.com with SMTP id r21so6995086qtw.11 for ; Mon, 06 Sep 2021 22:22:59 -0700 (PDT) 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=M+rA8+3Q2/reHSlhbHhBlqj72CCeyLhcHpj9j7Qi7kw=; b=SwCI4aN1EUHaIe7x3WjxQCJlqZ9d9yyj+f7hzCEgqJI9ZbxxNqDnURLhJbfACxl2Ym z8Za7i4IB33cGmp9WCJ9V2nuflpAzgpSKflBNyD+Tx2dBcEFEHf1X89Aig9VzuxmH36W OmkZ3NWkUCs2qnCJIniTFIsjWnQADlc3rCDl7E1TqxEXc8ZYq0U+UrU+RmOXrctQ5Ann R6tL1tt0GIgm1vX7qw/bnQf+b4t6diqG5o6azRzK0asLLBkFFr6kxIimz7NKPzXxQCBQ EojknJFBgGUzovfofxuGezU8kC3UBmcyQHXzvkc3QFS3Gqp8dr1AMYDZ0bi3qrxmDQCA ipBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=M+rA8+3Q2/reHSlhbHhBlqj72CCeyLhcHpj9j7Qi7kw=; b=Hrzn7SieRsUPHLa55VFLUhNN4T2E10GUPF3eXWHF1NXaKdlBgTUtaVNWzKzinmDgHW 8kMfpV7lJ3IqpHO9DYffXXvLFGCMZRrTspsUr+qlCP53A9YEyZIBpBoxxYwPB1xje4C9 VGnJ1gRatRVP6tFkRH2/53IChK4L0jAonqQDJ4RJ1eiqfByEyl8r9urkzDxYUYPmq3Qu qs+TVGCJTp1L4qyihe9F+KyBNZ3C2mwKVCkh8gQ16RbJFOKyozLG3WbLdDK4L/PdIWHU z/CCjQVtNRxRcv7XfWJQsnaEuMrDe2isHXxOqEvdQDoKJILODqjFp7l7G06sLBCP0M/r 4ucQ== X-Gm-Message-State: AOAM53113Px++iK2T4pNH9RCDKJxl6+QlUWlethGMKwhFmWvSzu6PaN0 TyLr9cC68kOeV0Pt2JZaPs+16R8q2Yk31Q== X-Google-Smtp-Source: ABdhPJwrRFsMQSc1brvQZr8zHh/67SmU77+iUvCbNh/tAo240vGFOtUhlRoeIjhyKsEMzJrvl5aq3w== X-Received: by 2002:ac8:24e:: with SMTP id o14mr13972082qtg.42.1630992178103; Mon, 06 Sep 2021 22:22:58 -0700 (PDT) Received: from localhost.localdomain ([2601:5c6:8000:98:4364:bb79:1fd4:2c19]) by smtp.gmail.com with ESMTPSA id s16sm6630184qtq.31.2021.09.06.22.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 22:22:57 -0700 (PDT) From: Andrew Patterson Date: Tue, 7 Sep 2021 01:22:28 -0400 Message-Id: <20210907052228.20761-1-andrewpatt7@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=andrewpatt7@gmail.com; helo=mail-qt1-x82d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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, 07 Sep 2021 03:06:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 07 Sep 2021 13:27: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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631035685; 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=M+rA8+3Q2/reHSlhbHhBlqj72CCeyLhcHpj9j7Qi7kw=; b=GF85MZGrA2TrTooqNDDT7vHgOw68UPA9xpqg9pJur8o5uB5WFbpSPBPbgYmfhgcp81FZ1G DEGHdNeyF6O2hWIaegPLgxfvUylpVepg+w72yvi+HBqinz8GATBSVLFlzYW5/i4PeBKwHA AqLxaLx/sPzgEe2wHHITnV912LUWd2uXbFpaDBszfitOvR/WDO2aEsIIgWvM0gIAqVwkSj PxmbyRojQnApqzTdEsAFnwjKDxkT+PB31qNvusGPXfNevScIwqyEZZnrl9tAvzdJ1EA7nZ 3mnkAWDG/rWclDQIOdBWTLuSJtR7j4WgCCIJZqKPcnWXybK2rXHXF0Zc40lIRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631035685; a=rsa-sha256; cv=none; b=sn0IygrPrD8jr1ne7NpuD0F3RAFy0ivoUL1htDLlKuMFArLwAOkhiTiGB5G4Smx70UmbxC OhBjUE0hOTwLWZEDSRCZRuTLOe2xrnolxbYhjm3pHTIygyMZpblIEZGJSamw/VUcWlIkyC ZVjhfNmDibMfUJtb0LJQcTavstzKe7V0D2IXXHMJ0tLo1aNNkPBgBa7qdwCciSx52kG5Fo SyEE5goOngKvtfRl4URlu0/yL4lTfCyzfSFKxSsIHF0ISEgEp4l6gzhjbSBXXP1Lz3mjQY D7R1AFwpfQtjPCBNjLLipt53dXnECipPksdgS9D/FPlz0NqXWXkocVB4coY4PQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SwCI4aN1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SwCI4aN1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: CCBF13BA1 X-Spam-Score: 1.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: S7PHqhi/aX+O --- Note that this is a minor version behind; zig 0.8.0 depends on all the clang headers version 12.x, and the current version of lld is 11.x. gnu/packages/zig.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 gnu/packages/zig.scm diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm new file mode 100644 index 0000000000..bb8af0c98d --- /dev/null +++ b/gnu/packages/zig.scm @@ -0,0 +1,73 @@ +(define-module (gnu packages zig) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) + #:use-module ((guix licenses) #:prefix l:) + #:use-module (guix build utils) + #:use-module (gnu packages) + #:use-module (gnu packages llvm) + #:use-module (guix utils)) + +;; Zig versions depend on specific LLVM major versions; should be able to update +;; to 0.8.x with lld@12 +(define-public zig + (package + (name "zig") + (version "0.7.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ziglang/zig") + (commit version))) + (sha256 + (base32 + "0gq8xjqr3n38i2adkv9vf936frac80wh72dvhh4m5s66yafmhphg")))) + (build-system cmake-build-system) + (inputs + `(("llvm" ,llvm-11) + ("clang-toolchain" ,clang-toolchain-11) + ("lld" ,lld))) ; is currently version 11 + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (add-before 'install 'set-cachedir + (lambda* _ ;; See [[https://github.com/ziglang/zig/issues/6810]] + (setenv "XDG_CACHE_HOME" "/tmp/")))))) + (home-page "https://ziglang.org/") + (synopsis + "Programming language for maintaining robust, optimal, and reusable software") + (description + "Zig is a general-purpose programming language and toolchain for +maintaining robust, optimal, and reusable software. + +⚡ A Simple Language + +Focus on debugging your application rather than debugging your programming +language knowledge. +@itemize @bullet +@item No hidden control flow. +@item No hidden memory allocations. +@item No preprocessor, no macros. +@end itemize + +⚡ Comptime + +A fresh approach to metaprogramming based on compile-time code execution and +lazy evaluation. +@itemize @bullet +@item Call any function at compile-time. +@item Manipulate types as values without runtime overhead. +@item Comptime emulates the target architecture. +@end itemize + +⚡ Performance Meets Safety + +Write fast, clear code capable of handling all error conditions. +@itemize @bullet +@item The language gracefully guides your error handling logic. +@item Configurable runtime checks help you strike a balance between performance +and safety guarantees. +@item Take advantage of vector types to express SIMD instructions portably. +@end itemize") + (license l:expat))) -- 2.33.0