From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: Question about nix Date: Sat, 14 May 2016 22:36:46 +0300 Message-ID: <20160514193646.GA7469@debian-netbook> References: <871t54u1tp.fsf@mailerver.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5/uDoXvLw7AC5HRs" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1hfa-0005qy-MY for help-guix@gnu.org; Sat, 14 May 2016 18:04:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1hfU-00080C-Lh for help-guix@gnu.org; Sat, 14 May 2016 18:04:20 -0400 Received: from flashner.co.il ([178.62.234.194]:37669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1hfU-0007vy-9p for help-guix@gnu.org; Sat, 14 May 2016 18:04:16 -0400 Content-Disposition: inline In-Reply-To: <871t54u1tp.fsf@mailerver.i-did-not-set--mail-host-address--so-tickle-me> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Matthew Jordan Cc: help-guix@gnu.org --5/uDoXvLw7AC5HRs Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 14, 2016 at 10:54:58AM -0400, Matthew Jordan wrote: > Good day everyone, >=20 > 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). >=20 > 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). >=20 > I'm also curious as to whereter guix and nix can share "/gnu/store" or do > they need to run with their own stores? >=20 > 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. >=20 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. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="golang.scm" Content-Transfer-Encoding: quoted-printable ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015, 2016 Efraim Flashner ;;; ;;; 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 . (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. Ultima= tely ;; 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= =2E4 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++, wi= th garbage collection, various safety features and in the style of communicati= ng 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)))))) --k+w/mQv8wyuph6w0-- --5/uDoXvLw7AC5HRs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXN35JAAoJEPTB05F+rO6TxecQAID8XYhjFif3QRWcqHGGK976 kmI7ETMncE//pRiM0f/FHQSHrZFep2dtA0HlG58Ct3WNIA9B/2H+BecBgY4KTkAZ cAmgRq9HB4FyYAqy4bXCToiX8Vyfi+i3KW8tsCcx0zwFKt3cGdqMREjOKQwnT46W SI6KIbN7RvIMRekxBfqzjfCgjyJJj84jSBzVX+jD4gTKMEoggzSAGPs65zRW/sLV zJxEF0KtCwuWq4mX8r922u65iE08uL13g89S+jUd/Sb8Vvic/6aYF481RaGBZBvo Gj1uTUc8D7pPbIO21dGPb5TZ+OY0Je6vr+6kjAaj0Fhi775xWufgmrYJqdgmJkdO E9N/skNUG3F2WWSqOxhY3b4h7glxedgQcdnvc889byaY2kRDxyPEyqO/vLdS6GKV fkSpNrSFnGpyGNjjFl6EM2SWLhxtR2oy/13YdDzKY3gPjd64bWmDBGRfeAcRVo/u YmeVuuR/F+1AqK//JoR80EalDQ0vpdx8CIcUnF/1inz4gWyVIwMXe7PRLH9kltSn R4Hiciyab7+Ar+mmm3+RtTlLKfYckytJaTRhVz06YCwOzAkawizO5U4bHJTKgWxo emdeIpfHbahZfSftTRVruXoSxm0oorzxRW5xkftThg6oAgqREaMcSydTKRJOObkm sBd+beQcZncv3+emVLSF =9Azf -----END PGP SIGNATURE----- --5/uDoXvLw7AC5HRs--