From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHaYp-0006XY-Lq for guix-patches@gnu.org; Sat, 12 May 2018 15:52:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHaYl-0002XQ-8q for guix-patches@gnu.org; Sat, 12 May 2018 15:52:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51963) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHaYl-0002XK-4R for guix-patches@gnu.org; Sat, 12 May 2018 15:52:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fHaYk-0000AC-U7 for guix-patches@gnu.org; Sat, 12 May 2018 15:52:02 -0400 Subject: [bug#31436] [PATCH 5/6] gnu: Add clinfo. References: In-Reply-To: Resent-Message-ID: From: Fis Trivial Date: Sat, 12 May 2018 19:51:41 +0000 Message-ID: Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: "31436@debbugs.gnu.org" <31436@debbugs.gnu.org> * 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 Loa= der can load any (free or non free) ICD") (license license:bsd-2))) =20 +(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=3D" + (assoc-ref outputs "out"))))) + ;; OpenCL vendors are registered in $GUIX_PROFILE/etc/OpenCL/vend= ors/ + ;; 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 plat= forms +and devices") + (description "clinfo is a simple command-line application that enumera= tes +all possible (known) properties of the OpenCL platform and devices availab= le on +the system.") + (license license:cc0))) + (define-public beignet (package (name "beignet") --=20 2.14.3