[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] add address@hidden
From: |
Matthew Jordan |
Subject: |
[PATCH] add address@hidden |
Date: |
Sun, 10 Jul 2016 19:52:08 -0400 |
User-agent: |
mu4e 0.9.16; emacs 24.5.1 |
Good Day,
Attached a patch to add address@hidden I updated this one in a similar manner
to what was asked for address@hidden However, let me know if any other changes
are required, or if I missed something.
>From 523d4ea6a97072831b91b7b7e7e3eb69a0b0ebca Mon Sep 17 00:00:00 2001
From: Matthew Jordan <address@hidden>
Date: Thu, 26 May 2016 08:59:06 -0400
Subject: [PATCH 1/2] gnu: Add address@hidden
* gnu/packages/golang.scm (go-1.5): New variable.
Co-author: Efraim Flashner <address@hidden>
Co-author: Andy Wingo <address@hidden>
---
gnu/packages/golang.scm | 144 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 144 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cc1b66f..7590ced 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -183,3 +183,147 @@ 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.5
+ (package
+ (inherit go-1.4)
+ (name "go")
+ (version "1.5.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://storage.googleapis.com/golang/"
+ name version ".src.tar.gz"))
+ (sha256
+ (base32
+ "14xwn2pr3g4i1h8qpyrjjdmq1pgvzkagk4aqsp841hfxwyyclah0"))))
+ (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)))
+ '("parse_test.go" "port_test.go"))
+
+ ;; 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\", ")))
+
+ (substitute* "os/os_test.go"
+ (("/usr/bin") (getcwd))
+ (("/bin/pwd") (which "pwd")))
+
+ ;; 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.+)")
+ ("net/listen_test.go" "(.+)(TestIPv4MulticastListener\\(.+)")
+ ("syscall/exec_linux_test.go"
+ "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)")))
+
+ (substitute* "net/lookup_unix.go"
+ (("/etc/protocols") (string-append net-base
"/etc/protocols")))
+ (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 "CGO_ENABLED" "1")
+ (zero? (system* "sh" "all.bash")))))
+ (replace 'install
+ (lambda* (#:key inputs 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)))))
--
2.9.0
Respectfully,
---
Matthew Jordan
- [PATCH] add address@hidden,
Matthew Jordan <=