unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 41778@debbugs.gnu.org
Subject: [bug#41778] [PATCH 2/3] gnu: add spirv-cross.
Date: Mon, 29 Jun 2020 12:06:49 +0200	[thread overview]
Message-ID: <20200629100649.26638-2-leo.prikler@student.tugraz.at> (raw)
In-Reply-To: <0e2c18a84e232f73a72d755a692feaece0118396.camel@student.tugraz.at>

* gnu/packages/vulkan.scm (spirv-cross): New variable.
---
 gnu/packages/vulkan.scm | 49 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index d5f5be6816..6468b0ec3d 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -102,6 +102,55 @@ SPIR-V modules.  The project includes an assembler, binary module
 parser,disassembler, validator, and optimizer for SPIR-V.")
     (license license:asl2.0)))
 
+(define-public spirv-cross
+  (package
+    (name "spirv-cross")
+    (version "2020-05-19")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/KhronosGroup/SPIRV-Cross")
+             (commit version)))
+       (sha256
+        (base32
+         "0zyijp9zx9wbd4i5lwjap7n793iz6yjkf27la60dsffxl75yy9pd"))
+       (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments
+     `(;; FIXME: The following tests fail:
+       ;;   15 - spirv-cross-test-opt
+       ;;   16 - spirv-cross-test-metal-opt
+       ;;   17 - spirv-cross-test-hlsl-opt
+       #:tests? #f
+       #:configure-flags
+       (list "-DSPIRV_CROSS_SHARED=YES")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests-to-find-deps
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "CMakeLists.txt"
+               (("\\$\\{CMAKE_(.*)_DIR\\}/external/glslang(.*)/bin")
+                (string-append (assoc-ref inputs "glslang") "/bin")))
+             (substitute* "CMakeLists.txt"
+               (("\\$\\{CMAKE_(.*)_DIR\\}/external/spirv-tools(.*)/bin")
+                (string-append (assoc-ref inputs "spirv-tools") "/bin")))
+             #t)))))
+    (inputs `(("glslang" ,glslang)
+              ("spirv-headers" ,spirv-headers)
+              ("spirv-tools" ,spirv-tools)))
+    (native-inputs `(("python" ,python)))
+    (home-page "https://github.com/KhronosGroup/SPIRV-Cross")
+    (synopsis "Parser for and converter of SPIR-V to other shader languages")
+    (description
+     "SPIRV-Cross tries hard to emit readable and clean output from the
+SPIR-V.  The goal is to emit GLSL or MSL that looks like it was written by a
+human and not awkward IR/assembly-like code.  NOTE: Individual features are
+expected to be mostly complete, but it is possible that certain obscure GLSL
+features are not yet supported.  However, most missing features are expected
+to be \"trivial\" improvements at this stage.")
+    (license license:asl2.0)))
+
 (define-public glslang
   (package
     (name "glslang")
-- 
2.26.2





  parent reply	other threads:[~2020-06-29 10:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 21:40 [bug#41778] [PATCH WIP 0/2] Add ppsspp Leo Prikler
2020-06-09 21:47 ` [bug#41778] [PATCH 1/2] gnu: Add armips Leo Prikler
2020-06-09 21:47   ` [bug#41778] [PATCH 2/2] gnu: Add ppsspp Leo Prikler
2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler
2020-06-29 10:06   ` [bug#41778] [PATCH 1/3] gnu: Add armips Leo Prikler
2020-06-29 10:06   ` Leo Prikler [this message]
2020-06-29 10:06   ` [bug#41778] [PATCH 3/3] gnu: Add ppsspp Leo Prikler
2020-06-29 22:02   ` [bug#41778] [PATCH 0/3] " Nicolas Goaziou
2020-06-29 23:33     ` Leo Prikler
2020-06-30 15:08       ` bug#41778: " Nicolas Goaziou
2020-06-30 21:31         ` [bug#41778] " Leo Prikler
2020-07-01 10:15           ` Nicolas Goaziou

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20200629100649.26638-2-leo.prikler@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=41778@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).