From patchwork Mon Mar 8 13:11:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 27537 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A435227BC51; Mon, 8 Mar 2021 13:44:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B58FB27BC50 for ; Mon, 8 Mar 2021 13:44:19 +0000 (GMT) Received: from localhost ([::1]:55086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJGBG-0001YC-VA for patchwork@mira.cbaines.net; Mon, 08 Mar 2021 08:44:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJFix-0001lZ-SS for guix-patches@gnu.org; Mon, 08 Mar 2021 08:15:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJFiw-0002SE-OF for guix-patches@gnu.org; Mon, 08 Mar 2021 08:15:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJFiw-0001GW-KF for guix-patches@gnu.org; Mon, 08 Mar 2021 08:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#47006] [PATCH] gnu: Add zig. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Mar 2021 13:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47006 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47006@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16152092444756 (code B ref -1); Mon, 08 Mar 2021 13:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Mar 2021 13:14:04 +0000 Received: from localhost ([127.0.0.1]:42351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJFi0-0001Ec-7e for submit@debbugs.gnu.org; Mon, 08 Mar 2021 08:14:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:55508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJFhv-0001Dz-Ep for submit@debbugs.gnu.org; Mon, 08 Mar 2021 08:14:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJFhv-0000wZ-8Y for guix-patches@gnu.org; Mon, 08 Mar 2021 08:13:59 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:46400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJFhr-0001ye-Qb for guix-patches@gnu.org; Mon, 08 Mar 2021 08:13:58 -0500 Received: from localhost.localdomain (217-149-164-20.nat.highway.telekom.at [217.149.164.20]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4DvJgs48t4z3wFK for ; Mon, 8 Mar 2021 14:13:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1615209225; bh=NCb7DsqfunqrWHvrUlTJ4Sh0Snhec4rLl4RVxdBSzyE=; h=From:To:Subject:Date; b=tqZ0JFbonb1c8Bkhv0IgViOYm0ThcTMInNO6YSUeJsc0iDTqMM87Xjk741kBjjSgO Y89nhLzucWwDIaBaM0k2ywb+B0knzlN9ZASAql4h2XWp0f0+rQ6t9cvfuitcDche6N loqBiDmWwxPYBxs0bW1HddXq0XJ9vem3c4abHBRI= From: Leo Prikler Date: Mon, 8 Mar 2021 14:11:56 +0100 Message-Id: <20210308131155.7441-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 Received-SPF: pass client-ip=129.27.2.202; envelope-from=leo.prikler@student.tugraz.at; helo=mailrelay.tugraz.at X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/zig.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it here. --- gnu/local.mk | 1 + gnu/packages/zig.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 gnu/packages/zig.scm diff --git a/gnu/local.mk b/gnu/local.mk index fb3b395852..abcf86fb7e 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..caf0a5e21a --- /dev/null +++ b/gnu/packages/zig.scm @@ -0,0 +1,65 @@ +;;; 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 + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-after 'configure 'set-home + (lambda _ + (setenv "HOME" (getcwd)) ; zig writes to $HOME/.cache + #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)))