From: Leo Famulari <leo@famulari.name>
To: 63006@debbugs.gnu.org
Subject: [bug#63006] [PATCH 2/3] gnu: Go: Do not depend on tzdata.
Date: Fri, 21 Apr 2023 17:01:01 -0400 [thread overview]
Message-ID: <4e15e1076c425b3e8e924edfc8adf61cba0df036.1682110862.git.leo@famulari.name> (raw)
In-Reply-To: <724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name>
* gnu/packages/golang.scm (go-1.4)[inputs]: Remove tzdata.
[arguments]: Adjust accordingly.
(go-1.14, go-1.16, go-1.17)[arguments]: Adjust accordingly.
---
gnu/packages/golang.scm | 27 +++++----------------------
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 24dae34e20..73c70f55fb 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -139,8 +139,6 @@ (define-public go-1.4
(ld (string-append (assoc-ref inputs "libc") "/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
@@ -195,8 +193,6 @@ (define-public go-1.4
(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))
#t)))
@@ -238,8 +234,7 @@ (define-public go-1.4
(copy-recursively "../" output)
#t))))))
(inputs
- `(("tzdata" ,tzdata)
- ("pcre" ,pcre)
+ `(("pcre" ,pcre)
("gcc:lib" ,(canonical-package gcc) "lib")))
(native-inputs
(list pkg-config which net-base perl))
@@ -285,8 +280,6 @@ (define-public go-1.14
(loader (car (append (find-files ld "^ld-linux.+")
(find-files ld "^ld(64)?\\.so.+"))))
(net-base (assoc-ref inputs "net-base"))
- (tzdata-path
- (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
(output (assoc-ref outputs "out")))
;; Having the patch in the 'patches' field of <origin> breaks
@@ -400,8 +393,6 @@ (define-public go-1.14
(("/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" "\\.go")
(("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
#t)))
@@ -497,9 +488,7 @@ (define-public go-1.16
(replace 'prebuild
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
- (net-base (assoc-ref inputs "net-base"))
- (tzdata-path
- (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
+ (net-base (assoc-ref inputs "net-base")))
;; Having the patch in the 'patches' field of <origin> breaks
;; the 'TestServeContent' test due to the fact that
@@ -591,9 +580,7 @@ (define-public go-1.16
(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)))))
+ (("/etc/services") (string-append net-base "/etc/services"))))))
(replace 'build
(lambda* (#:key inputs outputs (parallel-build? #t)
#:allow-other-keys)
@@ -665,9 +652,7 @@ (define-public go-1.17
(setenv "GOCACHE" "/tmp/go-cache"))))
(add-after 'unpack 'patch-source
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((net-base (assoc-ref inputs "net-base"))
- (tzdata-path (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo")))
+ (let* ((net-base (assoc-ref inputs "net-base")))
;; XXX: Remove when #49729 is merged?
(for-each make-file-writable (find-files "src"))
@@ -696,9 +681,7 @@ (define-public go-1.17
(string-append net-base "/etc/protocols")))
(substitute* "src/net/port_unix.go"
(("/etc/services")
- (string-append net-base "/etc/services")))
- (substitute* "src/time/zoneinfo_unix.go"
- (("/usr/share/zoneinfo/") tzdata-path)))))
+ (string-append net-base "/etc/services"))))))
;; Keep this synchronized with the package inputs.
;; Also keep syncthonized with later versions of go.
,@(if (or (target-arm?) (target-ppc64le?))
--
2.39.2
next prev parent reply other threads:[~2023-04-21 21:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 20:59 [bug#63006] Time zone database improvements Leo Famulari
2023-04-21 21:01 ` [bug#63006] [PATCH 1/3] gnu: libical: Find the time zone database in the environment Leo Famulari
2023-04-21 21:01 ` Leo Famulari [this message]
2023-04-21 21:01 ` [bug#63006] [PATCH 3/3] gnu: tzdata: Update to 2023c Leo Famulari
2023-04-30 21:00 ` [bug#63006] Time zone database improvements 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e15e1076c425b3e8e924edfc8adf61cba0df036.1682110862.git.leo@famulari.name \
--to=leo@famulari.name \
--cc=63006@debbugs.gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.