From 80e82f1f92823e04893e8400dc82b69e890c7276 Mon Sep 17 00:00:00 2001 From: Rutger Helling Date: Fri, 8 Dec 2017 14:56:36 +0100 Subject: [PATCH] gnu: vulkan: Add spirv-tools. * gnu/packages/vulkan.scm (spirv-tools): New variable. --- gnu/packages/vulkan.scm | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 2079b8e0a..248dc206c 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -19,9 +19,12 @@ (define-module (gnu packages vulkan) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system cmake) - #:use-module (gnu packages)) + #:use-module (gnu packages) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python)) (define-public spirv-headers (let ((commit "98b01515724c428d0f0a5d01deffcce0f5f5e61c") @@ -57,3 +60,33 @@ files from the SPIR-V Registry.") (license license:x11-style)))) ;; Custom license. See ;; https://github.com/KhronosGroup/SPIRV-Headers/blob/master/LICENSE for ;; details. + +(define-public spirv-tools + (package + (name "spirv-tools") + (version "2017.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/KhronosGroup/SPIRV-Tools/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "009vflaa71a7xhvmm23f4sdbcgdkl1k4facqkwsg6djha2sdpsqq")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list (string-append "-DCMAKE_INSTALL_LIBDIR=" + (assoc-ref %outputs "out") + "/lib") + (string-append "-DSPIRV-Headers_SOURCE_DIR=" + (assoc-ref %build-inputs + "spirv-headers"))))) + (inputs `(("python" ,python) + ("spirv-headers" ,spirv-headers))) + (native-inputs `(("pkg-config", pkg-config))) + (home-page "https://github.com/KhronosGroup/SPIRV-Tools") + (synopsis "API and commands for processing SPIR-V modules") + (description "The SPIR-V Tools project provides an API and commands for +processing SPIR-V modules.") + (license license:asl2.0))) -- 2.15.1