aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/parallel.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2021-07-29 14:41:46 +0200
committerLudovic Courtès <ludo@gnu.org>2021-07-29 21:54:55 +0200
commit4c5ad827808f6c9964c05c9777d02b200fa619bb (patch)
tree1dc7d53f7b423d58f0d95f2982a801df7621242e /gnu/packages/parallel.scm
parent646b5ad9835c4114be9aae415e02b877c957d2d0 (diff)
downloadguix-4c5ad827808f6c9964c05c9777d02b200fa619bb.tar
guix-4c5ad827808f6c9964c05c9777d02b200fa619bb.tar.gz
gnu: Add cpuinfo.
* gnu/packages/parallel.scm (cpuinfo): New variable. * gnu/packages/patches/cpuinfo-system-libraries.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/parallel.scm')
-rw-r--r--gnu/packages/parallel.scm31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 79387e5552..b5914fdffa 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -31,6 +31,7 @@
(define-module (gnu packages parallel)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module ((guix licenses) #:prefix license:)
@@ -41,6 +42,7 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages check)
#:use-module (gnu packages flex)
#:use-module (gnu packages freeipmi)
#:use-module (gnu packages linux)
@@ -411,3 +413,32 @@ pool, similar to those implemented by OpenMP run-time support libraries for
constructs such as @code{#pragma omp parallel for}, with additional
features.")
(license license:bsd-2))))
+
+(define-public cpuinfo
+ ;; There's currently no tag on this repo.
+ (let ((version "0.0")
+ (revision "1")
+ (commit "866ae6e5ffe93a1f63be738078da94cf3005cce2"))
+ (package
+ (name "cpuinfo")
+ (version (git-version version revision commit))
+ (home-page "https://github.com/pytorch/cpuinfo")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1lmsf4bpkm19a31i40qwcjn46qf7prggziv4pbsi695bkx5as71p"))
+ (patches (search-patches "cpuinfo-system-libraries.patch"))))
+ (build-system cmake-build-system)
+ (arguments '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
+ (inputs
+ `(("googletest" ,googletest)
+ ("googlebenchmark" ,googlebenchmark)))
+ (synopsis "C/C++ library to obtain information about the CPU")
+ (description
+ "The cpuinfo library provides a C/C++ and a command-line interface to
+obtain information about the CPU being used: supported instruction set,
+processor name, cache information, and topology information.")
+ (license license:bsd-2))))