blob: 4693e5477161f8a5f2fa56440e46fe2aeb0e5621 (
plain) (
blame)
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
|
{ stdenv, fetchFromGitHub, cmake, python }:
let
spirv_sources = {
# `vulkan-loader` requires a specific version of `spirv-tools` and `spirv-headers` as specified in
# `<vulkan-loader-repo>/spirv-tools_revision`.
tools = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "923a4596b44831a07060df45caacb522613730c9";
sha256 = "0hmgng2sv34amfsag3ya09prnv1w535djwlzfn8h2vh430vgawxa";
};
headers = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "33d41376d378761ed3a4c791fc4b647761897f26";
sha256 = "1s103bpi3g6hhq453qa4jbabfkyxxpf9vn213j8k4vm26lsi8hs2";
};
};
in
stdenv.mkDerivation rec {
name = "spirv-tools-${version}";
version = "2016-07-18";
src = spirv_sources.tools;
patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers'';
enableParallelBuilding = true;
buildInputs = [ cmake python ];
passthru = {
headers = spirv_sources.headers;
};
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "The SPIR-V Tools project provides an API and commands for processing SPIR-V modules";
license = licenses.asl20;
platforms = platforms.linux;
};
}
|