all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fis Trivial <ybbs.daans@hotmail.com>
To: "31436@debbugs.gnu.org" <31436@debbugs.gnu.org>
Subject: [bug#31436] [PATCH 5/6] gnu: Add clinfo.
Date: Sat, 12 May 2018 19:51:41 +0000	[thread overview]
Message-ID: <BLUPR16MB05003908A748E859E5390020929E0@BLUPR16MB0500.namprd16.prod.outlook.com> (raw)
In-Reply-To: <BLUPR16MB0500D0852942A2CF69BC740D929E0@BLUPR16MB0500.namprd16.prod.outlook.com>


* gnu/packages/opencl.scm (clinfo): New variable.
---
 gnu/packages/opencl.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm
index a84eeac01..5346d23ac 100644
--- a/gnu/packages/opencl.scm
+++ b/gnu/packages/opencl.scm
@@ -163,6 +163,58 @@ Loader as provided by this project.  This free ICD Loader can load any (free or
 non free) ICD")
     (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))))
+         (delete 'install)
+         (add-after 'build 'make-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "make" "install" (string-append
+                                       "PREFIX="
+                                       (assoc-ref outputs "out")))))
+         ;; OpenCL vendors are registered in $GUIX_PROFILE/etc/OpenCL/vendors/
+         ;; So we wrap clinfo to find those files. Otherwise, clinfo will try
+         ;; to find them in /etc/OpenCL/vendors
+         (add-after 'make-install 'wrap
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin/clinfo")))
+               (wrap-program bin
+                 `("OPENCL_VENDOR_PATH" ":" prefix
+                   ("$GUIX_PROFILE$GUIX_ENVIRONMENT/etc/OpenCL/vendors")))))))
+       ;; Cannot be run in store environment.
+       #:tests? #f))
+    (home-page "https://github.com/Oblomov/clinfo")
+    (synopsis "Print all known information about all available OpenCL platforms
+and devices")
+    (description "clinfo is a simple command-line application that enumerates
+all possible (known) properties of the OpenCL platform and devices available on
+the system.")
+    (license license:cc0)))
+
 (define-public beignet
   (package
     (name "beignet")
-- 
2.14.3

  parent reply	other threads:[~2018-05-12 19:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12 19:46 [bug#31436] [PATCH 0/6] gnu: Add opencl related packages Fis Trivial
2018-05-12 19:49 ` [bug#31436] [PATCH 1/6] gnu: Add opencl-headers Fis Trivial
2018-05-12 19:49 ` [bug#31436] [PATCH 2/6] gnu: Add opencl-clhpp Fis Trivial
2018-05-12 19:50 ` [bug#31436] [PATCH 3/6] gnu: Add ocl-icd Fis Trivial
2018-05-12 19:50 ` [bug#31436] [PATCH 4/6] gnu: Add beignet Fis Trivial
2018-05-12 19:51 ` Fis Trivial [this message]
2018-05-12 19:52 ` [bug#31436] [PATCH 6/6] gnu: Add pocl Fis Trivial
2018-05-26 17:42 ` [bug#31436] [PATCH 0/6] gnu: Add opencl related packages Fis Trivial
2018-05-28 12:51   ` Ludovic Courtès
2018-06-25 20:22 ` Ludovic Courtès
2018-06-25 20:58   ` Fis Trivial
2018-06-26 13:44     ` Ludovic Courtès
2018-06-26 18:49       ` Fis Trivial
2018-06-26 19:37       ` [bug#31436] [PATCH 0/3] Resend some opencl packages Fis Trivial
2018-06-26 19:39       ` [bug#31436] [PATCH 1/3] gnu: Add ocl-icd Fis Trivial
2018-06-26 20:26         ` Ludovic Courtès
2018-06-26 20:57           ` Fis Trivial
2018-06-26 19:39       ` [bug#31436] [PATCH 2/3] gnu: Add clinfo Fis Trivial
2018-06-26 20:32         ` Ludovic Courtès
2018-06-26 19:40       ` [bug#31436] [PATCH 3/3] gnu: Add beignet Fis Trivial
2018-06-26 21:00         ` bug#31436: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLUPR16MB05003908A748E859E5390020929E0@BLUPR16MB0500.namprd16.prod.outlook.com \
    --to=ybbs.daans@hotmail.com \
    --cc=31436@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.