unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] add go@1.6
@ 2016-07-27 23:54 Matthew Jordan
  2016-07-28  1:00 ` Alex Griffin
  2016-07-28 18:59 ` Leo Famulari
  0 siblings, 2 replies; 8+ messages in thread
From: Matthew Jordan @ 2016-07-27 23:54 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

Good Day everyone,

Attached is a patch to add go@1.6. Note that I have taken the
suggestion made in go@1.5 and added it to this patch. Also I have
included many of the suggested changes for go@1.4 in this patch also.

Take a look and let me know if I missed anything or need to make further changes.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to add go@1.6 --]
[-- Type: text/x-patch, Size: 8823 bytes --]

From 55066e5de6e1760833a4c1ab3d7cfccaa93bad92 Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Thu, 26 May 2016 09:16:48 -0400
Subject: [PATCH] gnu: Add go@1.6.

* gnu/packages/golang.scm (go-1.6): New variable.

Co-author: Efraim Flashner <efraim@flashner.co.il>
Co-author: Andy Wingo <wingo@igalia.com>
---
 gnu/packages/golang.scm | 165 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 165 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cc1b66f..ad46c81 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -183,3 +183,168 @@ 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-1.6
+  (package
+    (inherit go-1.4)
+    (name "go")
+    (version "1.6.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://storage.googleapis.com/golang/"
+                           name version ".src.tar.gz"))
+       (sha256
+        (base32
+         "1k5wy5ijll5aacj1m6xxnjfjw6x9f255ml3f1jiicw031mshnyvq"))))
+    (arguments
+     `(#:modules ((ice-9 match)
+                  (guix build gnu-build-system)
+                  (guix build utils))
+       #:tests? #f ; Tests are run by all.bash script
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'patch-generated-file-shebangs 'chdir
+           (lambda _ (chdir "src")))
+         (add-before 'build 'prebuild
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
+                    (ld (string-append
+                         (assoc-ref inputs "glibc") "/lib"))
+                    (loader (car (find-files ld "^ld-linux.+")))
+                    (net-base (assoc-ref inputs "net-base"))
+                    (tzdata-path
+                     (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
+                    (output (assoc-ref outputs "out")))
+
+               ;; Removing net/ tests, which fail when attempting to access
+               ;; network resources not present in the build container.
+               (for-each
+                (lambda (srcfile)
+                  (let ((srcfile (string-append "net/" srcfile)))
+                    (delete-file srcfile)))
+                '("listen_test.go" "parse_test.go"))
+
+               (substitute* "os/os_test.go"
+                 (("/usr/bin") (getcwd))
+                 (("/bin/pwd") (which "pwd")))
+
+               ;; Add libgcc to runpath
+               (substitute* "cmd/link/internal/ld/lib.go"
+                 (("!rpath.set") "true"))
+               (substitute* "cmd/go/build.go"
+                 (("cgoldflags := \\[\\]string\\{\\}")
+                  (string-append "cgoldflags := []string{"
+                                 "\"-rpath=" gcclib "\""
+                                 "}"))
+                 (("ldflags = setextld\\(ldflags, compiler\\)")
+                  (string-append
+                   "ldflags = setextld(ldflags, compiler)\n"
+                   "ldflags = append(ldflags, \"-r\")\n"
+                   "ldflags = append(ldflags, \"" gcclib "\")\n"))
+                 (("\"-lgcc_s\", ")
+                  (string-append
+                   "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
+
+               ;; Disable failing tests: these tests attempt to access
+               ;; commands or network resources which are neither available or
+               ;; necessary for the build to succeed.
+               (map
+                (match-lambda
+                  ((file regex)
+                   (substitute* file
+                     ((regex all before test_name)
+                      (string-append before "Disabled" test_name)))))
+                '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
+                  ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
+                  ("os/os_test.go" "(.+)(TestHostname.+)")
+                  ("time/format_test.go" "(.+)(TestParseInSydney.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestEcho.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestPipes.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestIgnorePipeErrorOnSuccess.+)")
+                  ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExtraFiles/areturn.+)")
+                  ("cmd/go/go_test.go" "(.+)(TestCoverageWithCgo.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestOutputStderrCapture.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)")
+                  ("net/lookup_test.go" "(.+)(TestLookupPort.+)")
+                  ("syscall/exec_linux_test.go"
+                   "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)")))
+
+               (substitute* "../misc/cgo/testsanitizers/test.bash"
+                 (("(CC=)cc" all var) (string-append var "gcc")))
+
+               ;; fix shebang for testar script
+               ;; note the target script is generated at build time.
+               (substitute* "../misc/cgo/testcarchive/test.bash"
+                 (("#!/usr/bin/env") (string-append "#!" (which "env"))))
+
+               (substitute* "net/lookup_unix.go"
+                 (("/etc/protocols") (string-append net-base "/etc/protocols")))
+               (substitute* "net/port_unix.go"
+                 (("/etc/services") (string-append net-base "/etc/services")))
+               (substitute* "time/zoneinfo_unix.go"
+                 (("/usr/share/zoneinfo/") tzdata-path))
+               (substitute*
+                   (find-files "cmd" "asm.c")
+                 (("/lib/ld-linux.*\\.so\\.[0-9]") loader)))))
+         (replace 'build
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((go  (assoc-ref inputs "go"))
+                    (output (assoc-ref outputs "out")))
+               (setenv "CC" (which "gcc"))
+               (setenv "GOOS" "linux")
+               (setenv "GOROOT" (dirname (getcwd)))
+               (setenv "GOROOT_BOOTSTRAP" go)
+               (setenv "GOROOT_FINAL" output)
+               (setenv "GOGC" "400")
+               (setenv "GO_TEST_TIMEOUT_SCALE" "9999")
+               (setenv "PATH"
+                       (string-append
+                        (getenv "GOROOT_FINAL") "/bin:"
+                        (getenv "GOROOT") "/bin:" (getenv "PATH")))
+               (setenv "CGO_ENABLED" "1")
+               (zero? (system* "sh" "all.bash")))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((output (assoc-ref outputs "out"))
+                    (doc_out (assoc-ref outputs "doc"))
+                    (docs (string-append doc_out "/share/doc/" ,name "-" ,version))
+                    (src (string-append
+                          (assoc-ref outputs "tests") "/share/" ,name "-" ,version)))
+               (mkdir-p src)
+               (copy-recursively "../test" (string-append src "/test"))
+               (delete-file-recursively "../test")
+               (mkdir-p docs)
+               (copy-recursively "../api" (string-append docs "/api"))
+               (delete-file-recursively "../api")
+               (copy-recursively "../doc" (string-append docs "/doc"))
+               (delete-file-recursively "../doc")
+
+               (for-each
+                (lambda (file)
+                  (let* ((filein (string-append "../" file))
+                         (fileout (string-append docs "/" file)))
+                    (copy-file filein fileout)
+                    (delete-file filein)))
+                '("README.md" "CONTRIBUTORS" "AUTHORS" "PATENTS"
+                  "LICENSE" "VERSION" "CONTRIBUTING.md" "robots.txt"))
+
+               (copy-recursively "../" output)))))))
+    (inputs
+     `(,@(package-inputs go-1.4)))
+    (native-inputs
+     `(("go" ,go-1.4)
+       ("glibc" ,glibc)
+       ,@(package-native-inputs go-1.4)))
+    (propagated-inputs
+     `(,@(package-propagated-inputs go-1.4)))))
+
+(define-public go go-1.6)
-- 
2.9.0


[-- Attachment #3: Type: text/plain, Size: 28 bytes --]


Sincerely,

Matthew Jordan

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] add go@1.6
  2016-07-27 23:54 [PATCH] add go@1.6 Matthew Jordan
@ 2016-07-28  1:00 ` Alex Griffin
  2016-07-28 10:11   ` Matthew Jordan
  2016-07-30 16:28   ` Matthew Jordan
  2016-07-28 18:59 ` Leo Famulari
  1 sibling, 2 replies; 8+ messages in thread
From: Alex Griffin @ 2016-07-28  1:00 UTC (permalink / raw)
  To: guix-devel

Hello Matthew,

I'm not done looking at the package, but here are some of my initial
thoughts:

On Wed, Jul 27, 2016, at 06:54 PM, Matthew Jordan wrote:
>     (version "1.6.2")

Version 1.6.3 was just released to fix a security issue.

>                (zero? (system* "sh" "all.bash")))))

This seems to work, but I think it should just be `(zero? (system*
"./all.bash"))`. It has a shebang, and expects bash, not sh.

If it doesn't cause any problems, we should delete pkg/bootstrap/* so
that it doesn't retain any references to go@1.4. I think that would
drastically reduce the size of its closure.

Also, I'm not sure I'm sold on splitting up into multiple outputs, but I
haven't thought about it much and don't have a strong opinion. The
"tests" output is only 5M and "doc" is only 10M, vs 270M for the default
output.
-- 
Alex Griffin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] add go@1.6
  2016-07-28  1:00 ` Alex Griffin
@ 2016-07-28 10:11   ` Matthew Jordan
  2016-07-28 11:25     ` Alex Griffin
  2016-07-30 16:28   ` Matthew Jordan
  1 sibling, 1 reply; 8+ messages in thread
From: Matthew Jordan @ 2016-07-28 10:11 UTC (permalink / raw)
  To: Alex Griffin; +Cc: guix-devel


>>     (version "1.6.2")

I'll update the version in an updated patch. Assuming no problems I'll
be happy to submit it.

>>                (zero? (system* "sh" "all.bash")))))
>
> This seems to work, but I think it should just be `(zero? (system*
> "./all.bash"))`. It has a shebang, and expects bash, not sh.

Doesn't sh already handle picking the shell/interpretor?  That's why I
put it there. sh or an sh compatible shell is usually the first to
start. Feel free to correct me if I'm wrong.

> If it doesn't cause any problems, we should delete pkg/bootstrap/* so
> that it doesn't retain any references to go@1.4. I think that would
> drastically reduce the size of its closure.

I'll look into this and get back to you.

> Also, I'm not sure I'm sold on splitting up into multiple outputs, but I
> haven't thought about it much and don't have a strong opinion. The
> "tests" output is only 5M and "doc" is only 10M, vs 270M for the default
> output.

This sounds like the beginning of a long conversation. Suffice to say
it's doesn't bother me either way.  However I would rather change this
in later patch, if it has to be changed.

Respectuflly,

Matthew Jordan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] add go@1.6
  2016-07-28 10:11   ` Matthew Jordan
@ 2016-07-28 11:25     ` Alex Griffin
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Griffin @ 2016-07-28 11:25 UTC (permalink / raw)
  To: Matthew Jordan; +Cc: guix-devel

On Thu, Jul 28, 2016, at 05:11 AM, Matthew Jordan wrote:
> Doesn't sh already handle picking the shell/interpretor?  That's why I
> put it there. sh or an sh compatible shell is usually the first to
> start. Feel free to correct me if I'm wrong.

In Guix, sh is provided by bash, but when bash is launched as sh it gets
put into a compatibility mode which might not be what script authors
expect. In this case I guess it doesn't really matter, it's a small
thing and it works either way.

> This sounds like the beginning of a long conversation. Suffice to say
> it's doesn't bother me either way.  However I would rather change this
> in later patch, if it has to be changed.

Okay, sounds fine to me.

Thanks for all your hard work!
-- 
Alex Griffin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] add go@1.6
  2016-07-27 23:54 [PATCH] add go@1.6 Matthew Jordan
  2016-07-28  1:00 ` Alex Griffin
@ 2016-07-28 18:59 ` Leo Famulari
  1 sibling, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2016-07-28 18:59 UTC (permalink / raw)
  To: Matthew Jordan; +Cc: guix-devel

On Wed, Jul 27, 2016 at 07:54:13PM -0400, Matthew Jordan wrote:
> Good Day everyone,
> 
> Attached is a patch to add go@1.6. Note that I have taken the
> suggestion made in go@1.5 and added it to this patch. Also I have
> included many of the suggested changes for go@1.4 in this patch also.
> 
> Take a look and let me know if I missed anything or need to make further changes.

It works for me! Hopefully an update to 1.6.3 is not too much work...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] add go@1.6
  2016-07-28  1:00 ` Alex Griffin
  2016-07-28 10:11   ` Matthew Jordan
@ 2016-07-30 16:28   ` Matthew Jordan
  2016-07-30 16:50     ` Alex Griffin
  2016-07-31 22:55     ` Ludovic Courtès
  1 sibling, 2 replies; 8+ messages in thread
From: Matthew Jordan @ 2016-07-30 16:28 UTC (permalink / raw)
  To: Alex Griffin; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 137 bytes --]

Good Day,

This patch contains the suggestions made in the previous email. Take a
look a let me know if any further changes are needed.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to add go@1.6 (precise version 1.6.3). --]
[-- Type: text/x-patch, Size: 8886 bytes --]

From fbe9e4074cd27449d2337f62c7004993d087f6ba Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Thu, 26 May 2016 09:16:48 -0400
Subject: [PATCH] gnu: Add go@1.6.

* gnu/packages/golang.scm (go-1.6): New variable.

Co-author: Efraim Flashner <efraim@flashner.co.il>
Co-author: Andy Wingo <wingo@igalia.com>
---
 gnu/packages/golang.scm | 167 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 167 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cc1b66f..6195bf4 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -183,3 +183,170 @@ 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-1.6
+  (package
+    (inherit go-1.4)
+    (name "go")
+    (version "1.6.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://storage.googleapis.com/golang/"
+                           name version ".src.tar.gz"))
+       (sha256
+        (base32
+         "002v6irgfd63zp9iza8nski5by0lar033j3ddpqiikw6bznsw9k3"))))
+    (arguments
+     `(#:modules ((ice-9 match)
+                  (guix build gnu-build-system)
+                  (guix build utils))
+       #:tests? #f ; Tests are run by all.bash script
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'patch-generated-file-shebangs 'chdir
+           (lambda _ (chdir "src")))
+         (add-before 'build 'prebuild
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
+                    (ld (string-append
+                         (assoc-ref inputs "glibc") "/lib"))
+                    (loader (car (find-files ld "^ld-linux.+")))
+                    (net-base (assoc-ref inputs "net-base"))
+                    (tzdata-path
+                     (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
+                    (output (assoc-ref outputs "out")))
+
+               ;; Removing net/ tests, which fail when attempting to access
+               ;; network resources not present in the build container.
+               (for-each
+                (lambda (srcfile)
+                  (let ((srcfile (string-append "net/" srcfile)))
+                    (delete-file srcfile)))
+                '("listen_test.go" "parse_test.go"))
+
+               (substitute* "os/os_test.go"
+                 (("/usr/bin") (getcwd))
+                 (("/bin/pwd") (which "pwd")))
+
+               ;; Add libgcc to runpath
+               (substitute* "cmd/link/internal/ld/lib.go"
+                 (("!rpath.set") "true"))
+               (substitute* "cmd/go/build.go"
+                 (("cgoldflags := \\[\\]string\\{\\}")
+                  (string-append "cgoldflags := []string{"
+                                 "\"-rpath=" gcclib "\""
+                                 "}"))
+                 (("ldflags = setextld\\(ldflags, compiler\\)")
+                  (string-append
+                   "ldflags = setextld(ldflags, compiler)\n"
+                   "ldflags = append(ldflags, \"-r\")\n"
+                   "ldflags = append(ldflags, \"" gcclib "\")\n"))
+                 (("\"-lgcc_s\", ")
+                  (string-append
+                   "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
+
+               ;; Disable failing tests: these tests attempt to access
+               ;; commands or network resources which are neither available or
+               ;; necessary for the build to succeed.
+               (map
+                (match-lambda
+                  ((file regex)
+                   (substitute* file
+                     ((regex all before test_name)
+                      (string-append before "Disabled" test_name)))))
+                '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
+                  ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
+                  ("os/os_test.go" "(.+)(TestHostname.+)")
+                  ("time/format_test.go" "(.+)(TestParseInSydney.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestEcho.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestPipes.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestIgnorePipeErrorOnSuccess.+)")
+                  ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExtraFiles/areturn.+)")
+                  ("cmd/go/go_test.go" "(.+)(TestCoverageWithCgo.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestOutputStderrCapture.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)")
+                  ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)")
+                  ("net/lookup_test.go" "(.+)(TestLookupPort.+)")
+                  ("syscall/exec_linux_test.go"
+                   "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)")))
+
+               (substitute* "../misc/cgo/testsanitizers/test.bash"
+                 (("(CC=)cc" all var) (string-append var "gcc")))
+
+               ;; fix shebang for testar script
+               ;; note the target script is generated at build time.
+               (substitute* "../misc/cgo/testcarchive/test.bash"
+                 (("#!/usr/bin/env") (string-append "#!" (which "env"))))
+
+               (substitute* "net/lookup_unix.go"
+                 (("/etc/protocols") (string-append net-base "/etc/protocols")))
+               (substitute* "net/port_unix.go"
+                 (("/etc/services") (string-append net-base "/etc/services")))
+               (substitute* "time/zoneinfo_unix.go"
+                 (("/usr/share/zoneinfo/") tzdata-path))
+               (substitute*
+                   (find-files "cmd" "asm.c")
+                 (("/lib/ld-linux.*\\.so\\.[0-9]") loader)))))
+         (replace 'build
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((go  (assoc-ref inputs "go"))
+                    (output (assoc-ref outputs "out")))
+               (setenv "CC" (which "gcc"))
+               (setenv "GOOS" "linux")
+               (setenv "GOROOT" (dirname (getcwd)))
+               (setenv "GOROOT_BOOTSTRAP" go)
+               (setenv "GOROOT_FINAL" output)
+               (setenv "GOGC" "400")
+               (setenv "GO_TEST_TIMEOUT_SCALE" "9999")
+               (setenv "PATH"
+                       (string-append
+                        (getenv "GOROOT_FINAL") "/bin:"
+                        (getenv "GOROOT") "/bin:" (getenv "PATH")))
+               (setenv "CGO_ENABLED" "1")
+               (zero? (system* "sh" "all.bash")))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((output (assoc-ref outputs "out"))
+                    (doc_out (assoc-ref outputs "doc"))
+                    (docs (string-append doc_out "/share/doc/" ,name "-" ,version))
+                    (src (string-append
+                          (assoc-ref outputs "tests") "/share/" ,name "-" ,version)))
+               (delete-file-recursively "../pkg/bootstrap")
+
+               (mkdir-p src)
+               (copy-recursively "../test" (string-append src "/test"))
+               (delete-file-recursively "../test")
+               (mkdir-p docs)
+               (copy-recursively "../api" (string-append docs "/api"))
+               (delete-file-recursively "../api")
+               (copy-recursively "../doc" (string-append docs "/doc"))
+               (delete-file-recursively "../doc")
+
+               (for-each
+                (lambda (file)
+                  (let* ((filein (string-append "../" file))
+                         (fileout (string-append docs "/" file)))
+                    (copy-file filein fileout)
+                    (delete-file filein)))
+                '("README.md" "CONTRIBUTORS" "AUTHORS" "PATENTS"
+                  "LICENSE" "VERSION" "CONTRIBUTING.md" "robots.txt"))
+
+               (copy-recursively "../" output)))))))
+    (inputs
+     `(,@(package-inputs go-1.4)))
+    (native-inputs
+     `(("go" ,go-1.4)
+       ("glibc" ,glibc)
+       ,@(package-native-inputs go-1.4)))
+    (propagated-inputs
+     `(,@(package-propagated-inputs go-1.4)))))
+
+(define-public go go-1.6)
-- 
2.9.0


[-- Attachment #3: Type: text/plain, Size: 32 bytes --]


Sincerely,

---
Matthew Jordan

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] add go@1.6
  2016-07-30 16:28   ` Matthew Jordan
@ 2016-07-30 16:50     ` Alex Griffin
  2016-07-31 22:55     ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Alex Griffin @ 2016-07-30 16:50 UTC (permalink / raw)
  To: Matthew Jordan; +Cc: guix-devel

Hey Matthew,

On Sat, Jul 30, 2016, at 11:28 AM, Matthew Jordan wrote:
> Good Day,
> 
> This patch contains the suggestions made in the previous email. Take a
> look a let me know if any further changes are needed.

Looks good to me!
-- 
Alex Griffin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] add go@1.6
  2016-07-30 16:28   ` Matthew Jordan
  2016-07-30 16:50     ` Alex Griffin
@ 2016-07-31 22:55     ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2016-07-31 22:55 UTC (permalink / raw)
  To: Matthew Jordan; +Cc: guix-devel

Hello!

Matthew Jordan <matthewjordandevops@yandex.com> skribis:

> From fbe9e4074cd27449d2337f62c7004993d087f6ba Mon Sep 17 00:00:00 2001
> From: Matthew Jordan <matthewjordandevops@yandex.com>
> Date: Thu, 26 May 2016 09:16:48 -0400
> Subject: [PATCH] gnu: Add go@1.6.
>
> * gnu/packages/golang.scm (go-1.6): New variable.
>
> Co-author: Efraim Flashner <efraim@flashner.co.il>
> Co-author: Andy Wingo <wingo@igalia.com>

Awesome!  I made small changes:

> +    (arguments
> +     `(#:modules ((ice-9 match)
> +                  (guix build gnu-build-system)
> +                  (guix build utils))
> +       #:tests? #f ; Tests are run by all.bash script
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (add-after 'patch-generated-file-shebangs 'chdir
> +           (lambda _ (chdir "src")))

… using ‘substitute-keyword-arguments’ here to try to factorize build
phases with go@1.4, though in practice there are subtle differences
preventing the ‘prebuild’ and ‘install’ phases from being factorized.
Would be nice to improve it eventually, somehow.
> +    (inputs
> +     `(,@(package-inputs go-1.4)))

This is equivalent to:

  (inputs (package-inputs go-1.4))

which is equivalent to putting nothing, since we already ‘inherit’ from
go-1.4.

> +    (propagated-inputs
> +     `(,@(package-propagated-inputs go-1.4)))))

Ditto.

Committed, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-31 22:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-27 23:54 [PATCH] add go@1.6 Matthew Jordan
2016-07-28  1:00 ` Alex Griffin
2016-07-28 10:11   ` Matthew Jordan
2016-07-28 11:25     ` Alex Griffin
2016-07-30 16:28   ` Matthew Jordan
2016-07-30 16:50     ` Alex Griffin
2016-07-31 22:55     ` Ludovic Courtès
2016-07-28 18:59 ` Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).