* [bug#69379] [PATCH 1/2] gnu: Add go-github-com-tklauser-numcpus.
2024-02-25 10:29 [bug#69379] [PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf Troy Figiel
@ 2024-02-25 10:22 ` Troy Figiel
2024-02-25 10:24 ` [bug#69379] [PATCH 2/2] gnu: Add go-github-com-tklauser-go-sysconf Troy Figiel
2024-03-06 23:53 ` bug#69379: [PATCH 0/2] " Sharlatan Hellseher
2 siblings, 0 replies; 4+ messages in thread
From: Troy Figiel @ 2024-02-25 10:22 UTC (permalink / raw)
To: 69379
* gnu/packages/golang-xyz.scm (go-github-com-tklauser-numcpus): New variable.
---
gnu/packages/golang-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#69379] [PATCH 2/2] gnu: Add go-github-com-tklauser-go-sysconf.
2024-02-25 10:29 [bug#69379] [PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf Troy Figiel
2024-02-25 10:22 ` [bug#69379] [PATCH 1/2] gnu: Add go-github-com-tklauser-numcpus Troy Figiel
@ 2024-02-25 10:24 ` Troy Figiel
2024-03-06 23:53 ` bug#69379: [PATCH 0/2] " Sharlatan Hellseher
2 siblings, 0 replies; 4+ messages in thread
From: Troy Figiel @ 2024-02-25 10:24 UTC (permalink / raw)
To: 69379
* gnu/packages/golang-xyz.scm (go-github-com-tklauser-go-sysconf): New variable.
---
gnu/packages/golang-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#69379] [PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf.
@ 2024-02-25 10:29 Troy Figiel
2024-02-25 10:22 ` [bug#69379] [PATCH 1/2] gnu: Add go-github-com-tklauser-numcpus Troy Figiel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Troy Figiel @ 2024-02-25 10:29 UTC (permalink / raw)
To: 69379
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#69379: [PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf.
2024-02-25 10:29 [bug#69379] [PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf Troy Figiel
2024-02-25 10:22 ` [bug#69379] [PATCH 1/2] gnu: Add go-github-com-tklauser-numcpus Troy Figiel
2024-02-25 10:24 ` [bug#69379] [PATCH 2/2] gnu: Add go-github-com-tklauser-go-sysconf Troy Figiel
@ 2024-03-06 23:53 ` Sharlatan Hellseher
2 siblings, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2024-03-06 23:53 UTC (permalink / raw)
To: 69379-done
[-- Attachment #1: Type: text/plain, Size: 54 bytes --]
Pushed as 548a4ac51c..bd4c6bbf0a to master.
--
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-06 23:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 10:29 [bug#69379] [PATCH 0/2] gnu: Add go-github-com-tklauser-go-sysconf Troy Figiel
2024-02-25 10:22 ` [bug#69379] [PATCH 1/2] gnu: Add go-github-com-tklauser-numcpus Troy Figiel
2024-02-25 10:24 ` [bug#69379] [PATCH 2/2] gnu: Add go-github-com-tklauser-go-sysconf Troy Figiel
2024-03-06 23:53 ` bug#69379: [PATCH 0/2] " Sharlatan Hellseher
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.