guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] gnu: Add go-1.5.


From: Efraim Flashner
Subject: [PATCH 3/3] gnu: Add go-1.5.
Date: Tue, 12 Jan 2016 18:31:38 +0200

* gnu/packages/golang.scm (go-1.5): New variable.
---
 gnu/packages/golang.scm | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cb1cbc1..6f281cf 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -91,4 +91,34 @@ garbage collection, various safety features and CSP-style 
concurrent programming
 features added.")
     (license license:bsd-3)))
 
-(define-public go go-1.4)
+(define-public go-1.5
+  (package (inherit go-1.4)
+    (version "1.5.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://storage.googleapis.com/golang/go";
+                            version ".src.tar.gz"))
+        (sha256
+         (base32
+          "0x3sk32ym93hnc0yk6bnra226f92qvixia6kwcf68q84q0jddpgk"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments go-1.4)
+       ((#:phases phases)
+        `(modify-phases ,phases
+         (replace 'build
+          (let* ((bash   (assoc-ref %build-inputs "bash"))
+                 (go14   (assoc-ref %build-inputs "go-1.4"))
+                 (output (assoc-ref %outputs "out")))
+            (setenv "CC" "gcc")
+            (setenv "GOPATH" (string-append (getcwd) "/go"))
+            (setenv "GOROOT_BOOTSTRAP" go14)
+            (setenv "GOROOT_FINAL" output)
+            (lambda _
+              (zero?
+                (system* (string-append bash "/bin/bash") "make.bash")))))))))
+    (native-inputs
+     `(("go-1.4" ,go-1.4)
+       ("perl" ,perl)))))
+
+(define-public go go-1.5)
-- 
2.7.0.rc3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]