From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sLiLAeZtT2CMeQAA0tVLHw (envelope-from ) for ; Mon, 15 Mar 2021 14:23:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OB3qOOVtT2B+TgAAB5/wlQ (envelope-from ) for ; Mon, 15 Mar 2021 14:23:33 +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 942F315604 for ; Mon, 15 Mar 2021 15:23:33 +0100 (CET) Received: from localhost ([::1]:41706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLo84-00073D-Ra for larch@yhetil.org; Mon, 15 Mar 2021 10:23:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLo6c-00063a-Rr for guix-patches@gnu.org; Mon, 15 Mar 2021 10:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLo6c-0002ad-JG for guix-patches@gnu.org; Mon, 15 Mar 2021 10:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLo6c-0002Qd-Fy for guix-patches@gnu.org; Mon, 15 Mar 2021 10:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47006] [PATCH v2 1/1] gnu: Add zig. Resent-From: =?UTF-8?Q?L=C3=A9o?= Le Bouter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Mar 2021 14:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47006 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47006@debbugs.gnu.org Cc: =?UTF-8?Q?L=C3=A9o?= Le Bouter , Leo Prikler Received: via spool by 47006-submit@debbugs.gnu.org id=B47006.16158180859277 (code B ref 47006); Mon, 15 Mar 2021 14:22:02 +0000 Received: (at 47006) by debbugs.gnu.org; 15 Mar 2021 14:21:25 +0000 Received: from localhost ([127.0.0.1]:36308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLo61-0002PY-AX for submit@debbugs.gnu.org; Mon, 15 Mar 2021 10:21:25 -0400 Received: from mail.zaclys.net ([178.33.93.72]:54373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLo5t-0002P0-KY for 47006@debbugs.gnu.org; Mon, 15 Mar 2021 10:21:22 -0400 Received: from localhost.localdomain (82-64-145-38.subs.proxad.net [82.64.145.38]) (authenticated bits=0) by mail.zaclys.net (8.14.7/8.14.7) with ESMTP id 12FEL8nb026359 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 15 Mar 2021 15:21:10 +0100 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.zaclys.net 12FEL8nb026359 Authentication-Results: mail.zaclys.net; spf=fail smtp.mailfrom=lle-bout@zaclys.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zaclys.net; s=default; t=1615818070; bh=yulflcoIPLqBDgqSRfbI7i6i7E+GRbUk/9hnfRHsYNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZYg4+FCtKNSLxNfHDDWn+agHJMeikOfaSL4olk5tQrBwMPRKOQ8b3q7Jre2RM6Jl3 cZ4u3iaZ2alKMQrqk4KrkJLfJIOBAGezcHpS+XYH/YYnfRBsk4Bz7TNv4Dvg34syzi 3NdDzvj46UgUbEkEkmKg6UilxT4Eyj8I1Fr0HFDY= Date: Mon, 15 Mar 2021 15:20:45 +0100 Message-Id: <20210315142045.25392-2-lle-bout@zaclys.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315142045.25392-1-lle-bout@zaclys.net> References: <20210315142045.25392-1-lle-bout@zaclys.net> 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" Reply-to: =?UTF-8?Q?L=C3=A9o?= Le Bouter X-ACL-Warn: , =?UTF-8?Q?L=C3=A9o?= Le Bouter via Guix-patches From: =?UTF-8?Q?L=C3=A9o?= Le Bouter via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615818213; h=from:from:sender:sender:reply-to: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=yulflcoIPLqBDgqSRfbI7i6i7E+GRbUk/9hnfRHsYNY=; b=lrzWl6DHy6pyZJNLwtaw4NhDV2wvUoYWWttc7+jyOCIJ9uYx57TT9MPCu0V6ZgxhNLPGAK /TZU3ula8Syk3oM5F7JmQKG0yS+vBHPeJBBmPz+VqFf1ovJQ7zLsdfD78QjF0JaepswUun gPbqn6Zi4h+jUrFV8wLHH0BzjevXKatHXlbl0fPW7uojrXDs0YJ0+flDM9oyafVqiqJ232 L2IZa255RZnvA56v030X7qPsYAXc64KWesU7QPcRXNgcsKMEDdH0YNJ4m8NdSeC1CfE92E RWalLmfGAt8kcRPLXLYJKc59GsqNNBqz3/Bo91y2RW3us/YkbVT6t3Ft9R4fYg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615818213; a=rsa-sha256; cv=none; b=N6TdNh4Dezwiwcoc3OUNuW9guTJwBoW3n1rqEq0lCniC2SdMlA+oFd4RbNWlKXMterMFil jhcPTakIElfsi9SsPbH6ZT3VQ+cKl8qBM7EG51Kwxwck+lxH0Ys2hlDcQ+0LlLb//l0hJY BweGZm/UKv4A3GjwtpeBxr79eEaWIqG5av7SAH0pd4vMm828aA+ad9riWN226u+OTvL9Wh G8EUymmtI0nhs3tOZmOkEQ2PODienYH50X30ZrRsA81uu0WwFJopqLZoN8+POaQFzNYg3x okN9eU+9b+cT43f/thVFhIC88R7aj5pJpYTQA/uGg8D7nCw4ooorW0QtTOWtcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=zaclys.net header.s=default header.b=ZYg4+FCt; dmarc=pass (policy=none) header.from=gnu.org; 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.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=zaclys.net header.s=default header.b=ZYg4+FCt; dmarc=pass (policy=none) header.from=gnu.org; 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: 942F315604 X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: 17uOjpa9wifq From: Leo Prikler * gnu/packages/zig.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it here. Co-authored-by: Léo Le Bouter --- gnu/local.mk | 1 + gnu/packages/zig.scm | 76 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 gnu/packages/zig.scm diff --git a/gnu/local.mk b/gnu/local.mk index cf8849cf59..ffa8005533 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -586,6 +586,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/xdisorg.scm \ %D%/packages/xorg.scm \ %D%/packages/xfce.scm \ + %D%/packages/zig.scm \ %D%/packages/zile.scm \ %D%/packages/zwave.scm \ \ diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm new file mode 100644 index 0000000000..adc4c3e1e0 --- /dev/null +++ b/gnu/packages/zig.scm @@ -0,0 +1,76 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Leo Prikler +;;; +;;; 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 licenses) #:prefix license:) + #:use-module (guix build-system cmake) + #:use-module (gnu packages) + #:use-module (gnu packages llvm)) + +(define-public zig + (package + (name "zig") + (version "0.7.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ziglang/zig.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1z6c4ym9jmga46cw2arn7zv2drcpmrf3vw139gscxp27n7q2z5md")))) + (build-system cmake-build-system) + (native-inputs + `(("clang" ,clang-11) + ("lld" ,lld) + ("llvm" ,llvm-11))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'save-unpack-dir + (lambda _ + ;; HACK: Passing unpacked source directory to 'check phase. + (setenv "ZIG_UNPACK_DIR" (getcwd)) + #t)) + (add-after 'configure 'set-home + (lambda _ + (setenv "HOME" (getcwd)) ; zig writes to $HOME/.cache + #t)) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key outputs #:allow-other-keys) + (with-directory-excursion (getenv "ZIG_UNPACK_DIR") + (invoke (string-append (assoc-ref outputs "out") "/bin/zig") + "build" "test")) + #t))))) + (synopsis "General purpose programming language and toolchain") + (description "Zig is a general-purpose programming language and +toolchain. Among other features it provides +@itemize +@item an Optional type instead of null pointers, +@item manual memory management, +@item generic data structures and functions, +@item compile-time reflection and compile-time code execution, +@item integration with C using zig as a C compiler, and +@item concurrency via async functions. +@end itemize") + (home-page "https://github.com/ziglang/zig") + (license license:expat))) -- 2.30.2