* Help with zig package
@ 2021-03-24 18:38 Dhruvin Gandhi
2021-03-24 20:34 ` Léo Le Bouter
0 siblings, 1 reply; 2+ messages in thread
From: Dhruvin Gandhi @ 2021-03-24 18:38 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
Hello Guix,
I've been working on building latest zig compiler toolchain (0.7.1)
following Simon Nielsen's work (bug#39480 for 0.5.0).
The compiler builds correctly. But it fails during the install phase.
It is able to copy the binary to /bin/zig but it fails while copying
the libraries to /lib (this is what I understood from logs and by manual
inspection).
It would be great if someone can help me figure this out. Thanks!
Regards,
Dhruvin Gandhi
[-- Attachment #2: WIP zig package --]
[-- Type: text/x-patch, Size: 3322 bytes --]
From 59bb5d3427f7df186b4d8adc198e3b7ad1c6a69b Mon Sep 17 00:00:00 2001
From: Dhruvin Gandhi <contact@dhruvin.dev>
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 <mate.f.gerdes@gmail.com>
# Copyright © 2020 Vinicius Monego <monego@posteo.net>
# Copyright © 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+# Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
#
# 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 <tauoverpiu@yandex.com>
+;;; Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-24 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 18:38 Help with zig package Dhruvin Gandhi
2021-03-24 20:34 ` Léo Le Bouter
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.