guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: Add clinfo.


From: Ludovic Courtès
Subject: 02/03: gnu: Add clinfo.
Date: Tue, 26 Jun 2018 17:04:53 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 184a214bad352a08d03ab34c7baa3cad2f57c14d
Author: Fis Trivial <address@hidden>
Date:   Tue Jun 26 19:39:42 2018 +0000

    gnu: Add clinfo.
    
    * gnu/packages/opencl.scm (clinfo): New variable.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/packages/opencl.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm
index 3b65d75..3ce8a14 100644
--- a/gnu/packages/opencl.scm
+++ b/gnu/packages/opencl.scm
@@ -157,3 +157,45 @@ programming.")
 Drivers).  An OpenCL program can use several ICDs thanks to the use of an ICD
 Loader as provided by this package.")
     (license license:bsd-2)))
+
+(define-public clinfo
+  (package
+    (name "clinfo")
+    (version "2.2.18.04.06")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/Oblomov/clinfo/archive/";
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0v7cy01irwdgns6lzaprkmm0502pp5a24zhhffydxz1sgfjj2w7p"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("opencl-headers" ,opencl-headers)))
+    (inputs
+     `(("ocl-icd" ,ocl-icd)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+           (lambda _
+             (let ((cores (number->string (parallel-job-count))))
+               (setenv "CC" "gcc")
+               (invoke "make" "-j" cores))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "make" "install" (string-append
+                                       "PREFIX="
+                                       (assoc-ref outputs "out"))))))
+       #:tests? #f))
+    (home-page "https://github.com/Oblomov/clinfo";)
+    (synopsis "Print information about OpenCL platforms and devices")
+    ;; Only the implementation installed via Guix will be detected.
+    (description
+     "This package provides the @command{clinfo} command that enumerates all
+possible (known) properties of the OpenCL platform and devices available on
+the system.")
+    (license license:cc0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]