3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/spirv-tools/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

2016-08-31 11:19:14 +01:00
{ stdenv, fetchFromGitHub, cmake, python }:
let
spirv_sources = {
# `vulkan-loader` requires a specific version of `spirv-tools` and `spirv-headers` as specified in
2017-04-01 20:28:59 +01:00
# `<vulkan-loader-repo>/external_revisions/spirv-tools_revision`.
2016-08-31 11:19:14 +01:00
tools = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
2017-04-01 20:28:59 +01:00
rev = "7fe8a57a5bd72094e91f9f93e51dac2f2461dcb4";
sha256 = "0rh25y1k3m3f1nqs032lh3mng5qfw9kqn6xv9yzzm47i1i0b6hmr";
2016-08-31 11:19:14 +01:00
};
headers = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
2017-04-01 20:28:59 +01:00
rev = "6c08995e6e7b94129e6086c78198c77111f2f262";
sha256 = "07m12wm9prib7hldj7pbc8vwnj0x6llgx4shzgy8x4xbhbafawws";
2016-08-31 11:19:14 +01:00
};
};
in
stdenv.mkDerivation rec {
name = "spirv-tools-${version}";
2017-04-01 20:28:59 +01:00
version = "2017-03-23";
2016-08-31 11:19:14 +01:00
src = spirv_sources.tools;
patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers'';
enableParallelBuilding = true;
2016-08-31 11:19:14 +01:00
buildInputs = [ cmake python ];
passthru = {
headers = spirv_sources.headers;
};
2016-08-31 11:19:14 +01:00
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;
2017-04-01 20:28:59 +01:00
maintainers = [ maintainers.ralith ];
2016-08-31 11:19:14 +01:00
};
}