unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob d8fa616f2a67d3e2541876754aea6d2dbf9b937a 6866 bytes (raw)
name: gnu/packages/vulkan.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(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 bison)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages xorg))

(define-public spirv-headers
  (let ((commit "98b01515724c428d0f0a5d01deffcce0f5f5e61c")
        (revision "1"))
    (package
     (name "spirv-headers")
     (version (string-append "0.0-" revision "." (string-take commit 9)))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/KhronosGroup/SPIRV-Headers")
             (commit commit)))
       (sha256
        (base32
         "15bknwkv3xwmjs3lmkp282a1wrp0da1b4lp45i4yiav04zmqygj2"))
       (file-name (string-append name "-" version "-checkout"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f ;; No tests
        #:phases (modify-phases %standard-phases
                   (replace 'install
                     (lambda*
                       (#:key outputs #:allow-other-keys)
                         (system* "cmake" "-E" "copy_directory"
                                  "../source/include/spirv" (string-append
                                  (assoc-ref outputs "out")
                                  "/include/spirv")))))))
     (home-page "https://github.com/KhronosGroup/SPIRV-Headers")
     (synopsis "Machine-readable files from the SPIR-V Registry")
     (description "SPIRV-Headers is a repository containing machine-readable
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)))

(define-public glslang
  ;; Version 3.0 is too old for vulkan-icd-loader. Use a recent git commit
  ;; until the next stable version.
  (let ((commit "471bfed0621162a7513fc24a51e8a1ccc2e640ff")
        (revision "1"))
    (package
     (name "glslang")
     (version (string-append "0.0-" revision "." (string-take commit 9)))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/KhronosGroup/glslang")
             (commit commit)))
       (sha256
        (base32
         "0m2vljmrqppp80ghbbwfnayqw2canxlcjhgy6jw9xjdssln0d3pd"))
       (file-name (string-append name "-" version "-checkout"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f ;; No tests
        ;; glslang tries to set CMAKE_INSTALL_PREFIX manually. Remove the
        ;; offending line.
        #:phases (modify-phases %standard-phases
                   (add-after 'patch-source-shebangs 'fix-cmakelists
                     (lambda _
                       (substitute* "CMakeLists.txt"
                                    (("set.*CMAKE_INSTALL_PREFIX.*") "")))))))
   (inputs `(("bison" ,bison)))
   (native-inputs `(("pkg-config" ,pkg-config)))
   (home-page "https://github.com/KhronosGroup/glslang")
   (synopsis "OpenGL and OpenGL ES shader front end and validator")
   (description "glslang is a OpenGL and OpenGL ES shader front end and
validator.")
   ;; Modified BSD license. See "copyright" section of
   ;; https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
   (license license:bsd-3))))

(define-public vulkan-icd-loader
  (package
   (name "vulkan-icd-loader")
   (version "1.0.61.1")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/"
           "archive/sdk-" version ".tar.gz"))
     (sha256
      (base32
       "05g60hk30sbc4rwkh7nrgqdk6hfsi4hwxs54yrysrzr18xpfb8j7"))))
   (build-system cmake-build-system)
   (arguments
    `(#:tests? #f ;; No tests
      #:configure-flags (list (string-append "-DCMAKE_INSTALL_LIBDIR="
                                (assoc-ref %outputs "out") "/lib"))))
   (inputs `(("glslang" ,glslang)
             ("libxcb" ,libxcb)
             ("libx11" ,libx11)
             ("libxrandr" ,libxrandr)
             ("mesa" ,mesa)
             ("python" ,python)
             ("spirv-tools" ,spirv-tools)
             ("wayland" ,wayland)))
   (native-inputs `(("pkg-config", pkg-config)))
   (home-page (string-append "https://github.com/"
              "KhronosGroup/Vulkan-LoaderAndValidationLayers"))
   (synopsis "Khronos official ICD loader for Vulkan")
   (description "Vulkan-ICD-Loader provides Khronos official ICD loader and
validation layers for Vulkan developers on GNU/Linux.")
   (license license:asl2.0)))

debug log:

solving d8fa616f2 ...
found d8fa616f2 in https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/ ||
	https://yhetil.org/guix-patches/afa7e2be8770a6efd32e5a0617ffcbe3@mykolab.com/ ||
	https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/
found 03562e45d in https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/ ||
	https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/
found 248dc206c in https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/ ||
	https://yhetil.org/guix-patches/afa7e2be8770a6efd32e5a0617ffcbe3@mykolab.com/ ||
	https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/
found 2079b8e0a in https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/ ||
	https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/

applying [1/4] https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
new file mode 100644
index 000000000..2079b8e0a

Checking patch gnu/packages/vulkan.scm...
Applied patch gnu/packages/vulkan.scm cleanly.

skipping https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/ for 2079b8e0a
index at:
100644 2079b8e0a0f1ab0ec94b643c007a79cf325f724d	gnu/packages/vulkan.scm

applying [2/4] https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 2079b8e0a..248dc206c 100644

Checking patch gnu/packages/vulkan.scm...
Applied patch gnu/packages/vulkan.scm cleanly.

skipping https://yhetil.org/guix-patches/afa7e2be8770a6efd32e5a0617ffcbe3@mykolab.com/ for 248dc206c
skipping https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/ for 248dc206c
index at:
100644 248dc206c8a4d6a20dde5825d56981fe66ff6def	gnu/packages/vulkan.scm

applying [3/4] https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 248dc206c..03562e45d 100644

Checking patch gnu/packages/vulkan.scm...
Applied patch gnu/packages/vulkan.scm cleanly.

skipping https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/ for 03562e45d
index at:
100644 03562e45dff40c29e078ac2da23f1e3b828d359b	gnu/packages/vulkan.scm

applying [4/4] https://yhetil.org/guix-patches/3756bc948027ec654d31fa019426eed7@mykolab.com/
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 03562e45d..d8fa616f2 100644

Checking patch gnu/packages/vulkan.scm...
Applied patch gnu/packages/vulkan.scm cleanly.

skipping https://yhetil.org/guix-patches/afa7e2be8770a6efd32e5a0617ffcbe3@mykolab.com/ for d8fa616f2
skipping https://yhetil.org/guix-patches/8fca8310a7dc13b9e8e98a4ee7517fac@mykolab.com/ for d8fa616f2
index at:
100644 d8fa616f2a67d3e2541876754aea6d2dbf9b937a	gnu/packages/vulkan.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).