[PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf.

  • Done
  • quality assurance status badge
Details
2 participants
  • Sharlatan Hellseher
  • Troy Figiel
Owner
unassigned
Submitted by
Troy Figiel
Severity
normal
T
T
Troy Figiel wrote on 25 Feb 11:29 +0100
(address . guix-patches@gnu.org)
878r38al98.fsf@troyfigiel.com
This patch series adds go-github-com-tklauser-go-sysconf and its dependency go-github-com-tklauser-numcpus.

Troy Figiel (2):
gnu: Add go-github-com-tklauser-numcpus.
gnu: Add go-github-com-tklauser-go-sysconf.

gnu/packages/golang-xyz.scm | 74 +++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)


base-commit: 1306beaf3f6c8ddded2a956f5863bc65aad78882
--
2.42.0
T
T
Troy Figiel wrote on 25 Feb 11:22 +0100
[PATCH 1/2] gnu: Add go-github-com-tklauser-numcpus.
(address . 69379@debbugs.gnu.org)
877cisaiqz.fsf@troyfigiel.com
* gnu/packages/golang-xyz.scm (go-github-com-tklauser-numcpus): New variable.
---
gnu/packages/golang-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index e68948e495..ad6b8f04e6 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -15,6 +15,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.
;;;
@@ -1189,6 +1190,42 @@ (define-public go-github-com-stathat-go
(home-page "https://github.com/stathat/go")
(license license:expat))))
+(define-public go-github-com-tklauser-numcpus
+ (package
+ (name "go-github-com-tklauser-numcpus")
+ (version "0.7.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tklauser/numcpus")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1xcwk42zr6q72zvkqdd9nbyhvq11rmwm2164mr2rvbb9z7alkff8"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:go go-1.18
+ #:import-path "github.com/tklauser/numcpus"
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'remove-failing-tests
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/"
+ import-path)
+ (for-each delete-file-recursively
+ ;; These tests try to access
+ ;; /sys/devices/system/cpu, which is not
+ ;; available in the test environment.
+ '("numcpus_test.go" "numcpus_linux_test.go"))))))))
+ (propagated-inputs (list go-golang-org-x-sys))
+ (home-page "https://github.com/tklauser/numcpus")
+ (synopsis "Provides information about the number of CPUs in the system")
+ (description
+ "This package provides both library functions and a command-line tool to
+query information regarding the number of CPUs available to the system.")
+ (license license:asl2.0)))
+
(define-public go-go-uber-org-automaxprocs
(package
(name "go-go-uber-org-automaxprocs")
--
2.42.0
T
T
Troy Figiel wrote on 25 Feb 11:24 +0100
[PATCH 2/2] gnu: Add go-github-com-tklauser-go-sysconf.
(address . 69379@debbugs.gnu.org)
875xycaiqf.fsf@troyfigiel.com
* gnu/packages/golang-xyz.scm (go-github-com-tklauser-go-sysconf): New variable.
---
gnu/packages/golang-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index ad6b8f04e6..1badc3856c 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -1190,6 +1190,43 @@ (define-public go-github-com-stathat-go
(home-page "https://github.com/stathat/go")
(license license:expat))))
+(define-public go-github-com-tklauser-go-sysconf
+ (package
+ (name "go-github-com-tklauser-go-sysconf")
+ (version "0.3.13")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tklauser/go-sysconf")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "07vkimncnmh89706s49599h2w9gwa6jyrv70f8ifw90nsh766km9"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:go go-1.18
+ #:import-path "github.com/tklauser/go-sysconf"
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'remove-failing-tests
+ (lambda* (#:key import-path #:allow-other-keys)
+ (delete-file-recursively
+ ;; sysconf_test.go (among others) tries to read the
+ ;; number of online CPUs using /proc/stat and
+ ;; /sys/devices/system/cpu/online. These files are not
+ ;; accessible in the test environment.
+ (string-append "src/" import-path
+ "/cgotest/sysconf_test.go")))))))
+ (propagated-inputs (list go-golang-org-x-sys
+ go-github-com-tklauser-numcpus))
+ (home-page "https://github.com/tklauser/go-sysconf")
+ (synopsis "Go implementation of @code{sysconf}")
+ (description
+ "This package implements @code{sysconf} and provides the associated
+@code{SC_*} constants to query system configuration values at run time.")
+ (license license:bsd-3)))
+
(define-public go-github-com-tklauser-numcpus
(package
(name "go-github-com-tklauser-numcpus")
--
2.42.0
S
S
Sharlatan Hellseher wrote on 7 Mar 00:53 +0100
[PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf.
(address . 69379-done@debbugs.gnu.org)
87frx26ho8.fsf@gmail.com
Pushed as 548a4ac51c..bd4c6bbf0a to master.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmXpAgcACgkQdtcnv/Ys
0rUy0xAAiiTRfvlr4Lau2XyW/R+wg34ABzHsOvttmp4AdgQWsYj4XBKXjiu1ojiN
Q01yf0apmXJrSeaGTxqZjJvmDu6jZbQQhsYAQUDBpVGO2hApAuAzabo5R3Q5SQTA
z3zihnplDcAuajvzNq/MoFPpzqfi8GrFH5MtqRpFEfj89RWCzDDqW6z9w0Vt6q1f
1FNvPARPfXYF3Qp75ugzCMvdf/7ofSqoQGjzmFMMEAu+s5Pksx/ukIQqUSROEKWM
TXK0HP2+LFISdDpBMZJF/xl4mz2UFS8K2F25f3Zr7hAwzbl/1VBWhZoboAHKrCPJ
HAGxR+gWj1nKttyAbLaX1FmMizZlJwFJQDU3RzVI0mR4xuwejDdh3VEjEbuvTFWS
x6ac4mRcoNEZ3c9WyPJyThdOZj0ajPr7U2qT2fqazdwKH3SFRptCgWYm6XGd2xYZ
Uae7nWH2d1pDEXUF1uPHk3cdGo05Yxl5b48YW3HoFuouCdCor/jAl0sKPyt7h3xs
2Drkda29urdfaBFCZWWmg9H0P2ltpc0wTOScp4uPE4L5dHJyrXYa7Vx5JEqSTtwx
BOw1wiXgTMWHX6w1P3fwLCt+U4aG86aRMAQcfFEEoOGfm40vxrr7Nw8iRY8ANqmf
PdofT/cfptEZ7pmkp0G0WNptOR4WxtTYtRQyGZAlbLMX9+mvSa0=
=d5w7
-----END PGP SIGNATURE-----

Closed
?