all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Troy Figiel <troy@troyfigiel.com>
To: 69234@debbugs.gnu.org
Subject: [bug#69234] [PATCH v3 2/5] gnu: go-github-com-shirou-gopsutil: Update to 2.21.11.
Date: Sat, 24 Feb 2024 09:19:28 +0100	[thread overview]
Message-ID: <87r0h29rx4.fsf@troyfigiel.com> (raw)
In-Reply-To: <87cysvbby7.fsf@troyfigiel.com>

* gnu/packages/golang-xyz.scm (go-github-com-shirou-gopsutil): Update to
2.21.11.
[arguments]: Fix tests.
<#:go>: Update to go-1.18.
<#:phases>: Add 'remove-v3 and 'remove-failing-tests phases.
[propagated-inputs]: Add go-golang-org-x-sys.
[native-inputs]: Add go-github-com-stretchr-testify and procps.

* gnu/packages/golang-xyz.scm: Add (gnu packages linux) module.
---
 gnu/packages/golang-xyz.scm | 63 ++++++++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 401c769da5..bcf46992e0 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -45,7 +45,8 @@ (define-module (gnu packages golang-xyz)
   #:use-module (gnu packages golang-build)
   #:use-module (gnu packages golang-check)
   #:use-module (gnu packages golang-compression)
-  #:use-module (gnu packages golang-crypto))
+  #:use-module (gnu packages golang-crypto)
+  #:use-module (gnu packages linux))
 
 ;;; Commentary:
 ;;;
@@ -1094,29 +1095,47 @@ (define-public go-github-com-rcrowley-go-metrics
       (license license:bsd-2))))
 
 (define-public go-github-com-shirou-gopsutil
-  (let ((commit "47ef3260b6bf6ead847e7c8fc4101b33c365e399")
-        (revision "0"))
-    (package
-      (name "go-github-com-shirou-gopsutil")
-      (version (git-version "v2.19.7" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                       (url "https://github.com/shirou/gopsutil")
-                       (commit commit))) ; XXX
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "0x1g4r32q4201nr2b754xnrrndmwsrhfr7zg37spya86qrmijnws"))))
-      (build-system go-build-system)
-      (arguments
-       '(#:import-path "github.com/shirou/gopsutil"))
-      (synopsis "Process and system monitoring in Go")
-      (description "This package provides a library for retrieving information
+  (package
+    (name "go-github-com-shirou-gopsutil")
+    (version "2.21.11")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/shirou/gopsutil")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0gpb10xkdwfimn1sp4jhrvzz4p3zgmdb78q8v23nap3yi6v4bff5"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:go go-1.18
+      #:import-path "github.com/shirou/gopsutil"
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'remove-v3
+                     (lambda* (#:key import-path #:allow-other-keys)
+                       ;; We remove the separately included v3 module.
+                       (delete-file-recursively (string-append "src/"
+                                                               import-path
+                                                               "/v3"))))
+                   (add-before 'check 'remove-failing-tests
+                     (lambda* (#:key import-path #:allow-other-keys)
+                       (delete-file-recursively
+                        ;; host_test.go tries to access files such as
+                        ;; /var/run/utmp that do not exist in the build
+                        ;; environment.
+                        (string-append "src/" import-path "/host/host_test.go")))))))
+    ;; TODO: Add go-github-com-tklauser-go-sysconf to propagated-inputs once
+    ;; it is packaged.
+    (propagated-inputs (list go-golang-org-x-sys))
+    (native-inputs (list go-github-com-stretchr-testify procps))
+    (synopsis "Process and system monitoring in Go")
+    (description "This package provides a library for retrieving information
 on running processes and system utilization (CPU, memory, disks, network,
 sensors).")
-      (home-page "https://github.com/shirou/gopsutil")
-      (license license:bsd-3))))
+    (home-page "https://github.com/shirou/gopsutil")
+    (license license:bsd-3)))
 
 (define-public go-github-com-skip2-go-qrcode
   (package
-- 
2.42.0





  parent reply	other threads:[~2024-02-24  8:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 10:50 [bug#69234] [PATCH] gnu: go-github-com-shirou-gopsutil: Update to 3.24.1 Troy Figiel
2024-02-18 22:42 ` Sharlatan Hellseher
2024-02-19  8:35   ` Troy Figiel
2024-02-19 13:13     ` Sharlatan Hellseher
2024-02-25 11:35     ` Troy Figiel
2024-02-22 23:14 ` [bug#69234] [PATCH v3 1/5] gnu: go-github-com-shirou-gopsutil: Move to golang-xyz Troy Figiel
2024-02-24  7:53 ` [bug#69234] [PATCH v3 3/5] gnu: go-github-com-shirou-gopsutil: Reformat with guix style Troy Figiel
2024-02-24  7:59 ` [bug#69234] [PATCH v3 4/5] gnu: Deprecate go-github-com-shirou-gopsutil Troy Figiel
2024-02-24  8:05 ` [bug#69234] [PATCH v3 5/5] gnu: Add go-github-com-shirou-gopsutil-v3 Troy Figiel
2024-02-24  8:10 ` [bug#69234] [PATCH v2 0/5] " Troy Figiel
2024-02-24  8:19 ` Troy Figiel [this message]
2024-02-24  8:25 ` [bug#69234] [PATCH v3 " Troy Figiel
2024-03-06 23:56 ` bug#69234: [PATCH] gnu: go-github-com-shirou-gopsutil: Update to 3.24.1 Sharlatan Hellseher

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=87r0h29rx4.fsf@troyfigiel.com \
    --to=troy@troyfigiel.com \
    --cc=69234@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.