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 uJ1AFC2hN2F9QQAAgWs5BA (envelope-from ) for ; Tue, 07 Sep 2021 19:28:13 +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 cAf2Dy2hN2HCWAAA1q6Kng (envelope-from ) for ; Tue, 07 Sep 2021 17:28:13 +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 E851F3BA8 for ; Tue, 7 Sep 2021 19:28:12 +0200 (CEST) Received: from localhost ([::1]:54548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNetI-0002QZ-09 for larch@yhetil.org; Tue, 07 Sep 2021 13:28:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNenK-0006c7-V9 for guix-patches@gnu.org; Tue, 07 Sep 2021 13:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNenK-0004t1-NY for guix-patches@gnu.org; Tue, 07 Sep 2021 13:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNenK-0001tN-EV for guix-patches@gnu.org; Tue, 07 Sep 2021 13:22: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 17:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50449 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50449@debbugs.gnu.org Cc: Andrew Patterson Received: via spool by 50449-submit@debbugs.gnu.org id=B50449.16310352937206 (code B ref 50449); Tue, 07 Sep 2021 17:22:02 +0000 Received: (at 50449) by debbugs.gnu.org; 7 Sep 2021 17:21:33 +0000 Received: from localhost ([127.0.0.1]:57539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNemq-0001sA-Q4 for submit@debbugs.gnu.org; Tue, 07 Sep 2021 13:21:33 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:45761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNemo-0001rq-UO for 50449@debbugs.gnu.org; Tue, 07 Sep 2021 13:21:31 -0400 Received: by mail-qt1-f180.google.com with SMTP id s32so8552189qtc.12 for <50449@debbugs.gnu.org>; Tue, 07 Sep 2021 10:21:30 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=3ERwgVvWoxHjO9SWbghbc6mhdzkgGIom1gL9E0GO3qc=; b=KgI/dnbVUfNem0FFLGUii2frKlzG9pVDxI6RomxcoCHdAuHMuDrscoe50aRpa+JbYe 9tgEiVTFb6QQH50VTY8C6pmD+9jK2Q9/33tMbbEj8FHDxBxaTrNueDjm7pJb1z3psYMf hLbnMUUOJn+68Y2Rcs1ZkORYBnq8p11MmITaSyQSept9oHCTJnrWR3zLTr6I727/gQ4I 3XmzckPqXJlNYl282JwJH/8xiz5TNCYtPDKT4EJjF4xJozVlA4xtPIx8+KWY+JG18/vN siDImqhy5RFTV8Ha6e4X3dxGK93dMPxilBzF5RbEz+J4rkSHxyU08FoI9xMICSbMLrRN O2MQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=3ERwgVvWoxHjO9SWbghbc6mhdzkgGIom1gL9E0GO3qc=; b=MQwfQugLuAhdSKvotxJI9IBARqNf6rr3gHZsRU4kWoSc8m/Y2zkpFVjzM8Kz0XZsVO Wvq1PB/8wb/WVN/jnOLzS3crD5aU1VlDriXUrCdOIJseYHlZKCTuYDQnIODTBuyEEpkI 1UGemP0oQcxS6golGYlbvkXdQzT2eWWO6gf9l4EWUO5dDniveGOrKKwnhZhNr3XEQcSP sh86ACk/TIlwWiTAVYWZwI/mt3G0xlp+GubW4r4PRwS2eUpK2TomJ1fznkVWpc5uyHgk 6tP8JWkzzZ5Mt4vhvu/cevqzJeMbYMd/w5yAVyUzMVy5abfD0I3YZ3NO8/NQrivB2jbS 8w0g== X-Gm-Message-State: AOAM530Dlsb4d0mijwWkIrVFp3kgvhUlM9awyEi7O7AFTlQC/fYrGUic y9Uv6k+F3jds76zbOsP3SI3CP91JfAg= X-Google-Smtp-Source: ABdhPJx1uU5HV3GCem7hyfYJWOYB6/VYUOXsWnSMufdXIqTNOG5XH3q3//W8u8L/jb0B13uQHBnJlg== X-Received: by 2002:ac8:5981:: with SMTP id e1mr16194699qte.358.1631035285140; Tue, 07 Sep 2021 10:21:25 -0700 (PDT) Received: from kalantha.lynchburg.edu ([161.115.86.198]) by smtp.gmail.com with ESMTPSA id h70sm9450075qke.54.2021.09.07.10.21.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 10:21:24 -0700 (PDT) From: Andrew Patterson Date: Tue, 7 Sep 2021 13:21:05 -0400 Message-Id: <20210907172105.8681-1-andrewpatt7@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=1631035693; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3ERwgVvWoxHjO9SWbghbc6mhdzkgGIom1gL9E0GO3qc=; b=IywV0kEJiFgXwbZU2RJjI83PxOFRwBl7S3jRdEkrosxBFa+NGRB8ULecwS/yshQiPwwF1u i2TJFjCWtySL1RNrln71hQ60cz8QSsepqwEiBz1+Xc2GCk6/37Kit7iG3WMXvs5oHXM8by nrWncN4c91vX/j1cfNod4Dn88Z8gk3fRrc3d/sQzIjojGg4WOl15XJYfsMVm8nMNKSoI3A 5hMSwlhqlzliyYmfS7udeaSpQ4K2CUgwpWPqIfFNpCAS7OmpKbjTKVaDsenxy1/osP5dos KlcXbPTA8gxo8MKIAZ+Wv0j1UUrcgVrAUM+YA6vhrp9/zKFKvzzCfwapXq8yrA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631035693; a=rsa-sha256; cv=none; b=ngOyQGKf41Bzkop7mtSLIfewYjO44HWoqTL62OdM60jHCpfaHkXY58GxEbClYXgmp2RC6w Ws3S4lv4Zs/5hDDeJC1O3QG/Lb8gIQSTOuBgCpPb4AvR+AANjSuY1Qn827hVJa1eoMJ/BB 2WtDBKWzrFcvHuw5YKCnFNfCLBlb0ZLtfcXWzXo/Hism78PN+wZx8KT7q1PXAyG/VFI4/3 7jezH6yyeBnuSknd3OvAwAfoDookQMxQe0+t8859rg6YkW6+EIu53Wdvq/z2UZhybppwQ+ sO2dlbdKNBcS/EyChKKd1AVzn0dW0HTMFZn8CaUK18afDNzyZ1PLu2awEsQJpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="KgI/dnbV"; 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="KgI/dnbV"; 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: E851F3BA8 X-Spam-Score: 1.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: wkJuDoNyliZt --- I forgot the copyright header last time; here it is with it. gnu/packages/zig.scm | 91 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 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..59056a1f88 --- /dev/null +++ b/gnu/packages/zig.scm @@ -0,0 +1,91 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Andrew Patterson +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(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