>From 59bb5d3427f7df186b4d8adc198e3b7ad1c6a69b Mon Sep 17 00:00:00 2001 From: Dhruvin Gandhi Date: Wed, 24 Mar 2021 23:41:14 +0530 Subject: [PATCH] WIP zig package --- gnu/local.mk | 2 ++ gnu/packages/zig.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 gnu/packages/zig.scm diff --git a/gnu/local.mk b/gnu/local.mk index 14d228cfa4..6b3632ea26 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -40,6 +40,7 @@ # Copyright © 2020 Malte Frank Gerdes # Copyright © 2020 Vinicius Monego # Copyright © 2021 Björn Höfling +# Copyright © 2021 Dhruvin Gandhi # # This file is part of GNU Guix. # @@ -586,6 +587,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/xorg.scm \ %D%/packages/xfce.scm \ %D%/packages/zile.scm \ + %D%/packages/zig.scm \ %D%/packages/zwave.scm \ \ %D%/services.scm \ diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm new file mode 100644 index 0000000000..4980025f59 --- /dev/null +++ b/gnu/packages/zig.scm @@ -0,0 +1,53 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Simon A. Nielsen Knights +;;; Copyright © 2021 Dhruvin Gandhi +;;; +;;; 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 licenses) #:prefix license:) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) + #: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") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1z6c4ym9jmga46cw2arn7zv2drcpmrf3vw139gscxp27n7q2z5md")))) + (build-system cmake-build-system) + (arguments `(#:tests? #f)) ; TODO (zig build test) + (native-inputs + `(("llvm" ,llvm-11) + ("clang" ,clang-11) + ("lld" ,lld))) + (description + "Zig compiler toolchain") + (synopsis + "Zig is a general-purpose programming language and toolchain for +maintaining robust, optimal, and reusable software.") + (home-page "https://ziglang.org") + (license license:expat))) + -- 2.31.0