From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6J0mJvaSOGEThwAAgWs5BA (envelope-from ) for ; Wed, 08 Sep 2021 12:39:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0FUhIvaSOGGzFwAAbx9fmQ (envelope-from ) for ; Wed, 08 Sep 2021 10:39:50 +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 4C67E1F428 for ; Wed, 8 Sep 2021 12:39:49 +0200 (CEST) Received: from localhost ([::1]:58748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNuzc-0004yx-96 for larch@yhetil.org; Wed, 08 Sep 2021 06:39:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNuYk-0005cy-No for guix-patches@gnu.org; Wed, 08 Sep 2021 06:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNuYk-0000LX-G6 for guix-patches@gnu.org; Wed, 08 Sep 2021 06:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNuYk-0001jf-15 for guix-patches@gnu.org; Wed, 08 Sep 2021 06:12: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: Wed, 08 Sep 2021 10:12:01 +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.16310959186660 (code B ref 50449); Wed, 08 Sep 2021 10:12:01 +0000 Received: (at 50449) by debbugs.gnu.org; 8 Sep 2021 10:11:58 +0000 Received: from localhost ([127.0.0.1]:58723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNuYf-0001jM-G0 for submit@debbugs.gnu.org; Wed, 08 Sep 2021 06:11:57 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:44616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNuYd-0001j9-HX for 50449@debbugs.gnu.org; Wed, 08 Sep 2021 06:11:56 -0400 Received: by mail-qt1-f170.google.com with SMTP id r21so1323275qtw.11 for <50449@debbugs.gnu.org>; Wed, 08 Sep 2021 03:11:55 -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=3w3pXynqyMpK+dZuCGGAxLDLrI75vLHna6aKcVw2CJM=; b=hHZDi8qLNHZ86gOBypo9JDUu5m3tJ8MSbA3RjRqPFe3oM4H0QRQYjerSLN8stJ4Hwx VbWxFIfH8dC4HbjS+2kaOAJoVj9DkVFjXwXFAdCgP31zvp7G4BrQ/F60BaOB6e+8duuK lxD8OKYXg7J8zRWU36Ik+ohr4VynDvr7rdSo5xmCgs9C7Xx0HeNBVcviqm6sNAeNn1CX LCtW3Cr3tlu1iLWeK4ErbxQVF0y+J6AZTqXfdAPq+WSNaruiWkm3NRo+IZzpXP6u4JFq gs7JR4hPOsRKKZbISV4ci/y4tyzJwbUquqO2FD0R7TIPk9LiWsACi9+llnVUWsjO+HPN wXDg== 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=3w3pXynqyMpK+dZuCGGAxLDLrI75vLHna6aKcVw2CJM=; b=NXNBcx2d9hiQvdDzXrdo2yM1N0873uyMK9wsNaOyn7RHOhukC7RTQI9/Ua1XvVy3xB 5cKI19tFqzpR37HiLyvxG1U9nPwdLoreE9f4cxIDl6F3rBLGOqCJebAzgwY6Zd8NWITe N+6O3+QlBN1XexG+FWJzu4+JXcq3g3TKYe8QZN/RfIOMhCGRNNz1qrnUuX9TDOOMqv2b cbP4UhMW6OfVSvstUs87HBuQ5WnNQ+gvftj+mphibJ3W0EyOGmb8hK8m2Q38OpoIhTlc ZUT2D5aKT22/B5LnX1x2oNPObFhLtH6nKaqA1AeM9GskjAQPowaQPInvlFR2g4YntLL1 r7qA== X-Gm-Message-State: AOAM531SQnxTEyMDUGgg8xeP/0MTm9usRi/IrOFYnInSlgFGbDLHH1g4 VuO3pPupPxEQrDYzJsU2eSxq/T0ZGdNSWg== X-Google-Smtp-Source: ABdhPJwXMd9pN4UEXcPCxPYwHiIcrjrRgioa6fUvlPSjNgHmZQ6jVG6tPlKJaDkqUU1teE51SP1oxA== X-Received: by 2002:ac8:4818:: with SMTP id g24mr2779563qtq.328.1631095909803; Wed, 08 Sep 2021 03:11:49 -0700 (PDT) Received: from localhost.localdomain ([2601:5c6:8000:98:4364:bb79:1fd4:2c19]) by smtp.gmail.com with ESMTPSA id o4sm1187269qti.24.2021.09.08.03.11.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 03:11:48 -0700 (PDT) From: Andrew Patterson Date: Wed, 8 Sep 2021 06:11:24 -0400 Message-Id: <20210908101125.31895-1-andrewpatt7@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210907172105.8681-1-andrewpatt7@gmail.com> References: <20210907172105.8681-1-andrewpatt7@gmail.com> 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-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=1631097590; 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=3w3pXynqyMpK+dZuCGGAxLDLrI75vLHna6aKcVw2CJM=; b=Ext4jEZH3kjl2FjDmMhhleWBMUVLUu4w0t87oktFArHIVY80brO4sshyiceYQf9dZF2FHd G8FvUCwP5AaUx5zsnnvaoH93mL7lnHjPbNIXxHE8bPBK933Rxff8yHPrVQXbtJUZMrzuV6 EeVcA+Ju8YFPoTtTY9i7zqzoCYonMNI2wtiJe1ZZ7HJPt21mso1kvU1D240r8lbmFYHxLk D6q17lPDrof+fgAd8dZ87pXnB+TQTilf1MVmnwYuIhfUxJgpq30hIpbSYY+84X+wtxdnp2 c6g7F1voILIUbGtTB56ueBDzwYbvJzT1ElEukKxQYO+IJqcC7/KJ/eQ8z6m9/w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631097590; a=rsa-sha256; cv=none; b=WIO+jIVrHURgpxk8SywadWxp70CA4JgwvjWSRb0Irk82KhkTMypQYJVWwleTFHkuKxpuwI SotLbS+5yq8RBYzLefTYAS7Cb/4t2ccO45PRl8gCS67aaSYlM5/q5lbzV3vtoCQr5heOcK 3AEkiSQnHCRFYNcQqUOuVyK3xt0hDHvdT4GqRbuQs8VVGyEQgNN+UEqDDRg9nHTXF+AtPv ZIJfaCbJnk7YNlP/fp7I3jLcwD8YIVLpBKn7D94kaZFeZ7sRql6YTGsPN9CWJTvDTKM5X5 COlo1OSo7zfQUV+Utp9ZZDYkdSUbER577yTyTRN24dQ3L4+mDvwff7HJpWzLZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hHZDi8qL; 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: -0.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hHZDi8qL; 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: 4C67E1F428 X-Spam-Score: -0.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: bFim9qeeQ52R --- Confusion between my main guix install and what I'm working on led to issues. Current status as to the Submitting Paches checklist in the info page: 1. That's the hash for 0.7.1 2. I've added a synopsis and description 3. I don't know what ~guix lint~'s complaint that "the source file name should contain the package name" means; otherwise, it's fine 4. It builds on x64 linux. 5. I haven't tried to build it on other platforms; the inputs might need to be native-inputs, but I'm not sure 6. It has a bundled libc, but that's because zig has a c compiler built in for some reason. 7. The ~guix size~ output seems reasonable. 8. There shouldn't be any dependent packages, since it's new. 9. ~guix build --rounds=2 zig~ worked fine. 10. Not relevant. 11. The patch is all adding zig. 12. I wrote the patch in emacs, so the indentation should be fine. 13. I don't think there are mirror urls for github? 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..ba48fcf51f --- /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 + "1z6c4ym9jmga46cw2arn7zv2drcpmrf3vw139gscxp27n7q2z5md")))) + (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