[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
43/172: gnu: go-github-com-prometheus-statsd-exporter: Fix build.
From: |
guix-commits |
Subject: |
43/172: gnu: go-github-com-prometheus-statsd-exporter: Fix build. |
Date: |
Mon, 21 Oct 2024 17:30:28 -0400 (EDT) |
sharlatan pushed a commit to branch go-team
in repository guix.
commit ce387e666f70e399594b59509bc5db2e25c8f3f6
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Fri Sep 13 23:27:36 2024 +0100
gnu: go-github-com-prometheus-statsd-exporter: Fix build.
* gnu/packages/prometheus.scm (go-github-com-prometheus-statsd-exporter):
Fix build
[arguments]: <#:phases>: Rework 'copy-input-to-vendor-directory and
'remove-vendor-directory by consolidating and simplifying them into
'fix-embed-files.
Change-Id: I5c255ea17dc9926bf9e2ea9a0a0e662afe9c2e5d
---
gnu/packages/prometheus.scm | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm
index c3267a234b..9786cf7007 100644
--- a/gnu/packages/prometheus.scm
+++ b/gnu/packages/prometheus.scm
@@ -516,30 +516,27 @@ kernel, and process metrics from the @file{/proc} pseudo
file system.")
#:import-path "github.com/prometheus/statsd_exporter"
#:phases
#~(modify-phases %standard-phases
- ;; FIXME: pattern landing_page.css: cannot embed irregular file
- ;; landing_page.css
+ ;; TODO: Implement it in go-build-system.
;;
;; This happens due to Golang can't determine the valid directory of
- ;; the module which is sourced during setup environment phase, but
- ;; easy resolved after coping to expected directory "vendor" within
- ;; the current package, see details in Golang source:
+ ;; the module of embed file which is symlinked during setup
+ ;; environment phase, but easy resolved after coping file from the
+ ;; store to the build directory of the current package, see details
+ ;; in Golang source:
;;
;; - URL: <https://github.com/golang/go/blob/>
;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
;; - file: src/cmd/go/internal/load/pkg.go#L2059
- (add-before 'build 'copy-input-to-vendor-directory
- (lambda* (#:key import-path #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (mkdir "vendor")
- (copy-recursively
- (string-append
- #$(this-package-input
"go-github-com-prometheus-exporter-toolkit")
- "/src/github.com")
- "vendor/github.com"))))
- (add-before 'install 'remove-vendor-directory
- (lambda* (#:key import-path #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (delete-file-recursively "vendor")))))))
+ (add-before 'build 'fix-embed-files
+ (lambda _
+ (for-each (lambda (file)
+ (let ((file-store-path (readlink file)))
+ (delete-file file)
+ (copy-recursively file-store-path file)))
+ (find-files "src" (string-append
+ ".*(editions_defaults.binpb"
+ "|landing_page.css"
+ "|landing_page.html)$"))))))))
(native-inputs
(list go-github-com-stvp-go-udp-testing))
(propagated-inputs
- 71/172: gnu: go-github-com-jonboulle-clockwork: Move to golang-xyz., (continued)
- 71/172: gnu: go-github-com-jonboulle-clockwork: Move to golang-xyz., guix-commits, 2024/10/21
- 73/172: gnu: go-github-com-google-btree: Update to 1.1.3., guix-commits, 2024/10/21
- 84/172: gnu: Add go-github-com-cyphar-filepath-securejoin., guix-commits, 2024/10/21
- 86/172: gnu: go-github-com-go-git-go-billy: Rename variable., guix-commits, 2024/10/21
- 93/172: gnu: Add go-github-com-muesli-combinator., guix-commits, 2024/10/21
- 146/172: gnu: Add go-github-com-prometheus-community-pro-bing., guix-commits, 2024/10/21
- 151/172: gnu: go-github-com-emersion-go-autostart: Move to golang-xyz., guix-commits, 2024/10/21
- 155/172: gnu: Add go-rsc-io-binaryregexp., guix-commits, 2024/10/21
- 156/172: gnu: Add go-github-com-rogpeppe-fastuuid., guix-commits, 2024/10/21
- 42/172: gnu: go-github-com-prometheus-exporter-toolkit: Fix build., guix-commits, 2024/10/21
- 43/172: gnu: go-github-com-prometheus-statsd-exporter: Fix build.,
guix-commits <=
- 165/172: gnu: go-github-com-tekwizely-go-parsing: Adjust description., guix-commits, 2024/10/21
- 45/172: gnu: go-github-com-libp2p-go-libp2p: Fix build., guix-commits, 2024/10/21
- 68/172: gnu: go-github-com-tomnomnom-gron: Improve package style., guix-commits, 2024/10/21
- 49/172: gnu: Add go-golang-org-x-telemetry-config., guix-commits, 2024/10/21
- 95/172: gnu: Add go-go-opentelemetry-io-otel., guix-commits, 2024/10/21
- 58/172: gnu: gopls: Update to 0.16.2., guix-commits, 2024/10/21
- 104/172: gnu: Add go-github-com-hashicorp-go-retryablehttp., guix-commits, 2024/10/21
- 102/172: gnu: Add go-github-com-datadog-datadog-go-v5., guix-commits, 2024/10/21
- 99/172: gnu: Add go-github-com-gofrs-uuid., guix-commits, 2024/10/21
- 111/172: gnu: Add go-github-com-ryanuber-columnize., guix-commits, 2024/10/21