unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Dhruvin Gandhi <contact@dhruvin.dev>
To: help-guix@gnu.org
Subject: Help with zig package
Date: Thu, 25 Mar 2021 00:08:24 +0530	[thread overview]
Message-ID: <87sg4kflcv.fsf@dhruvin.dev> (raw)

[-- 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


             reply	other threads:[~2021-03-24 20:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 18:38 Dhruvin Gandhi [this message]
2021-03-24 20:34 ` Help with zig package Léo Le Bouter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sg4kflcv.fsf@dhruvin.dev \
    --to=contact@dhruvin.dev \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).