From: Efraim Flashner <efraim@flashner.co.il>
To: Matthew Jordan <matthewjordandevops@yandex.com>
Cc: help-guix@gnu.org
Subject: Re: Question about nix
Date: Sat, 14 May 2016 22:36:46 +0300 [thread overview]
Message-ID: <20160514193646.GA7469@debian-netbook> (raw)
In-Reply-To: <871t54u1tp.fsf@mailerver.i-did-not-set--mail-host-address--so-tickle-me>
[-- Attachment #1.1: Type: text/plain, Size: 1482 bytes --]
On Sat, May 14, 2016 at 10:54:58AM -0400, Matthew Jordan wrote:
> Good day everyone,
>
> Recently I have been looking into rkt and acbuild which are both built
> with golang. But as there is no golang package in guix yet I was
> considering using nix since there is a package for that in guix (and nix
> has packages for go, rkt and acbuild).
>
> I'm wondering if anyone has any infomation on running Nix on
> guixSD. Perhaps in guix oriented way using the "config.scm" (guix system
> reconfigure).
>
> I'm also curious as to whereter guix and nix can share "/gnu/store" or do
> they need to run with their own stores?
>
> Also is the go/golang package still being worked on? I am not sure how
> much help I would be, but I would be willing to help out any way I can.
> Time permitting of course.
>
I have a non-working package for go. It builds fine, but it currently has
"cgo_enabled" set to 0, so I've been told it doesn't actually work. Its
totally possible I have other variables set wrong, I don't actually do
any programming in go, so I followed the go docs as best I could.
Either toss it in your GUIX_PACKAGE_PATH (and change the header from
(packages golang)) or do `guix package -f golang.scm', which should do
the trick.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #1.2: golang.scm --]
[-- Type: text/plain, Size: 4638 bytes --]
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is an addendum 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 (packages golang)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (gnu packages gcc)
#:use-module (gnu packages perl)
#:use-module (srfi srfi-1))
;; According to https://golang.org/doc/install/gccgo, gccgo-4.8.2 includes a
;; complete go-1.1.2 implementation, gccgo-4.9 includes a complete go-1.2
;; implementation, and gccgo-5 a complete implementation of go-1.4. Ultimately
;; we hope to build go-1.5+ with a bootstrap process using gccgo-5. As of
;; go-1.5, go cannot be bootstrapped without go-1.4, so we need to use go-1.4 or
;; gccgo-5. Mips is not officially supported, but it should work if it is
;; bootstrapped.
(define go-1.4
(package
(name "go")
(version "1.4.3")
(source
(origin
(method url-fetch)
(uri (string-append "https://storage.googleapis.com/golang/go"
version ".src.tar.gz"))
(sha256
(base32
"0na9yqilzpvq0bjndbibfp07wr796gf252y471cip10bbdqgqiwr"))))
(build-system gnu-build-system)
(outputs '("out" "doc" "tests"))
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-after 'patch-generated-file-shebangs 'chdir
(lambda _ (chdir "src")))
(replace 'build
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((gccgo (assoc-ref inputs "gccgo"))
(output (assoc-ref outputs "out")))
(setenv "CC" "gcc")
(setenv "GOROOT" (getcwd))
(setenv "GOROOT_BOOTSTRAP" gccgo)
(setenv "GOROOT_FINAL" output)
(setenv "CGO_ENABLED" "0")
;; all.bash includes the tests, which fail because they
;; require network access, and access to /bin
(zero? (system* "bash" "make.bash")))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((output (assoc-ref outputs "out"))
(docs (assoc-ref outputs "doc"))
(tests (assoc-ref outputs "tests")))
(copy-recursively "../test" tests)
(delete-file-recursively "../test")
(copy-recursively "../api" (string-append docs "/api"))
(delete-file-recursively "../api")
(copy-recursively "../doc" (string-append docs "/doc"))
(delete-file-recursively "../doc")
(copy-recursively "../" output)))))
#:tests? #f))
(native-inputs
`(("gccgo" ,gccgo-4.9)
("perl" ,perl)))
(home-page "https://golang.org/")
(synopsis "Compiled, statically typed language developed by Google")
(description "Go, also commonly referred to as golang, is a programming
language developed at Google. Designed primarily for systems programming, it
is a compiled, statically typed language in the tradition of C and C++, with
garbage collection, various safety features and in the style of communicating
sequential processes (CSP) concurrent programming features added.")
(license license:bsd-3)))
(define-public go
(package (inherit go-1.4)
(version "1.6.2")
(source
(origin
(method url-fetch)
(uri (string-append "https://storage.googleapis.com/golang/go"
version ".src.tar.gz"))
(sha256
(base32
"1k5wy5ijll5aacj1m6xxnjfjw6x9f255ml3f1jiicw031mshnyvq"))))
(native-inputs
`(("gccgo" ,go-1.4)
,@(alist-delete "gccgo" (package-native-inputs go-1.4))))))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-14 22:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-14 14:54 Question about nix Matthew Jordan
2016-05-14 19:36 ` Efraim Flashner [this message]
2016-05-15 20:46 ` Ludovic Courtès
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=20160514193646.GA7469@debian-netbook \
--to=efraim@flashner.co.il \
--cc=help-guix@gnu.org \
--cc=matthewjordandevops@yandex.com \
/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).