guix-commits
[Top][All Lists]
Advanced

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

56/74: gnu: go-github-com-prometheus-client-golang: Move to prometheus.


From: guix-commits
Subject: 56/74: gnu: go-github-com-prometheus-client-golang: Move to prometheus.
Date: Thu, 25 Jul 2024 18:02:28 -0400 (EDT)

sharlatan pushed a commit to branch go-team
in repository guix.

commit 7053ef0aaebcf1bc7a4205baccea973807ddae6f
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Thu Jul 25 10:24:15 2024 +0100

    gnu: go-github-com-prometheus-client-golang: Move to prometheus.
    
    * gnu/packages/golang.scm (go-github-com-prometheus-client-golang): Move
    from here ...
    * gnu/packages/prometheus.scm: ... to here.
    
    * gnu/packages/backup.scm: Add (gnu packages prometheus) module.
    * gnu/packages/golang-xyz.scm: Likewise.
    * gnu/packages/ipfs.scm: Likewise.
    * gnu/packages/irc.scm: Likewise.
    * gnu/packages/web.scm: Likewise.
    
    Change-Id: If3d78d31b1491f8a95616e59f50371c2914242d9
---
 gnu/packages/backup.scm     |  1 +
 gnu/packages/golang-xyz.scm |  1 +
 gnu/packages/golang.scm     | 49 -------------------------------------------
 gnu/packages/ipfs.scm       |  1 +
 gnu/packages/irc.scm        |  1 +
 gnu/packages/prometheus.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/web.scm        |  1 +
 7 files changed, 56 insertions(+), 49 deletions(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index c5bee744dd..1d484b3f51 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -88,6 +88,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages prometheus)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 8324a2f568..7d6b3a1c1d 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -72,6 +72,7 @@
   #:use-module (gnu packages golang-maths)
   #:use-module (gnu packages golang-web)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages prometheus) ; for 
go-github-com-nbrownus-go-metrics-prometheus
   #:use-module (gnu packages specifications))
 
 ;;; Commentary:
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 56e6c6a627..ab00edc877 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7375,55 +7375,6 @@ system, kernel, and process metrics from the 
@file{/proc} pseudo file system.")
     (home-page "https://github.com/prometheus/procfs";)
     (license license:asl2.0)))
 
-(define-public go-github-com-prometheus-client-golang
-  (package
-    (name "go-github-com-prometheus-client-golang")
-    (version "1.19.1")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/prometheus/client_golang";)
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0mx5q221pbkx081ycf1lp8sxz513220ya8qczkkvab943cwlcarv"))))
-    (build-system go-build-system)
-    (arguments
-     (list
-      #:import-path "github.com/prometheus/client_golang"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-examples-and-tutorials
-            (lambda* (#:key import-path #:allow-other-keys)
-              (with-directory-excursion (string-append "src/" import-path)
-                (for-each delete-file-recursively
-                          (list "api/prometheus/v1/example_test.go"
-                                "examples"
-                                "tutorial")))))
-          ;; XXX: Workaround for go-build-system's lack of Go modules support.
-          (delete 'build)
-          (replace 'check
-            (lambda* (#:key tests? import-path #:allow-other-keys)
-              (when tests?
-                (with-directory-excursion (string-append "src/" import-path)
-                  (invoke "go" "test" "-v" "./..."))))))))
-    (propagated-inputs
-     (list go-github-com-beorn7-perks
-           go-github-com-cespare-xxhash-v2
-           go-github-com-davecgh-go-spew
-           go-github-com-json-iterator-go
-           go-github-com-prometheus-client-model
-           go-github-com-prometheus-common
-           go-github-com-prometheus-procfs
-           go-golang-org-x-sys
-           go-google-golang-org-protobuf))
-    (synopsis "HTTP server and client tools for Prometheus")
-    (description "This package @code{promhttp} provides HTTP client and
-server tools for Prometheus metrics.")
-    (home-page "https://github.com/prometheus/client_golang";)
-    (license license:asl2.0)))
-
 (define-public go-github-com-zalando-go-keyring
   (package
     (name "go-github-com-zalando-go-keyring")
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index ea3514afa9..ccf5728e4f 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -37,6 +37,7 @@
   #:use-module (gnu packages golang-crypto)
   #:use-module (gnu packages golang-web)
   #:use-module (gnu packages golang-xyz)
+  #:use-module (gnu packages prometheus)
   #:use-module (gnu packages python)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages specifications))
diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index aa4c9b8b53..e1cccb6d1f 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -90,6 +90,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages prometheus)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-xyz)
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm
index 5ec4fe0b12..860bb74017 100644
--- a/gnu/packages/prometheus.scm
+++ b/gnu/packages/prometheus.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages golang)
   #:use-module (gnu packages golang-build)
   #:use-module (gnu packages golang-check)
+  #:use-module (gnu packages golang-crypto)
   #:use-module (gnu packages golang-web)
   #:use-module (gnu packages golang-xyz))
 
@@ -87,6 +88,56 @@ x/net/trace)} tracing wrappers @code{net.Conn}, both inbound
 (@@code{net.Listener}) and outbound (@@code{net.Dialer}).")
     (license license:asl2.0)))
 
+(define-public go-github-com-prometheus-client-golang
+  (package
+    (name "go-github-com-prometheus-client-golang")
+    (version "1.19.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/prometheus/client_golang";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0mx5q221pbkx081ycf1lp8sxz513220ya8qczkkvab943cwlcarv"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/prometheus/client_golang"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-examples-and-tutorials
+            (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (for-each delete-file-recursively
+                          (list "api/prometheus/v1/example_test.go"
+                                "examples"
+                                "tutorial")))))
+          ;; XXX: Workaround for go-build-system's lack of Go modules support.
+          (delete 'build)
+          (replace 'check
+            (lambda* (#:key tests? import-path #:allow-other-keys)
+              (when tests?
+                (with-directory-excursion (string-append "src/" import-path)
+                  (invoke "go" "test" "-v" "./..."))))))))
+    (propagated-inputs
+     (list go-github-com-beorn7-perks
+           go-github-com-cespare-xxhash-v2
+           go-github-com-davecgh-go-spew
+           go-github-com-json-iterator-go
+           go-github-com-prometheus-client-model
+           go-github-com-prometheus-common
+           go-github-com-prometheus-procfs
+           go-golang-org-x-sys
+           go-google-golang-org-protobuf))
+    (home-page "https://github.com/prometheus/client_golang";)
+    (synopsis "HTTP server and client tools for Prometheus")
+    (description
+     "This package @code{promhttp} provides HTTP client and server tools for
+Prometheus metrics.")
+    (license license:asl2.0)))
+
 (define-public go-github-com-prometheus-client-model
   (package
     (name "go-github-com-prometheus-client-model")
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index eb6699c3a1..2be0cae94e 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -186,6 +186,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages perl-compression)
+  #:use-module (gnu packages prometheus)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)



reply via email to

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