diff mbox series

[bug#69234,v3,5/5] gnu: Add go-github-com-shirou-gopsutil-v3.

Message ID 87msrq9rwo.fsf@troyfigiel.com
State New
Headers show
Series [bug#69234] gnu: go-github-com-shirou-gopsutil: Update to 3.24.1. | expand

Commit Message

Troy Figiel Feb. 24, 2024, 8:05 a.m. UTC
* gnu/packages/golang-xyz.scm (go-github-com-shirou-gopsutil-v3): New variable.
---
 gnu/packages/golang-xyz.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 6eb5770c0f..2c154dd11c 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -16,6 +16,7 @@ 
 ;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
 ;;; Copyright © 2023, 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1141,6 +1142,33 @@  (define-public go-github-com-shirou-gopsutil-v2
 (define-public go-github-com-shirou-gopsutil
   (deprecated-package "go-github-com-shirou-gopsutil" go-github-com-shirou-gopsutil-v2))
 
+(define-public go-github-com-shirou-gopsutil-v3
+  (package
+    (inherit go-github-com-shirou-gopsutil-v2)
+    (name "go-github-com-shirou-gopsutil-v3")
+    (version "3.24.1")
+    (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 "0mnlxfmssd15la95c64rsfds92fwp5yx4b2kb8madbj21qi813jf"))))
+    (arguments
+     (list
+      #:go go-1.18
+      #:import-path "github.com/shirou/gopsutil"
+      #:phases #~(modify-phases %standard-phases
+                   (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")))))))))
+
 (define-public go-github-com-skip2-go-qrcode
   (package
     (name "go-github-com-skip2-go-qrcode")