spirv-tools: 2018-09-20 -> 2019.1

This commit is contained in:
Benjamin Saunders 2019-02-17 09:52:50 -08:00
parent 94b2a0fc6b
commit d8d8a7a3eb

View file

@ -1,38 +1,25 @@
{ stdenv, fetchFromGitHub, cmake, python }:
{ stdenv, fetchFromGitHub, cmake, python, spirv-headers }:
let
spirv_sources = {
# `glslang` requires a specific version of `spirv-tools` and `spirv-headers` as specified in `known-good.json`.
tools = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "9bfe0eb25e3dfdf4f3fd86ab6c0cda009c9bd661";
sha256 = "1spfii4zib1lmz40vnz1d1cr6is7q2n7rvar1vfzi33gwrn8rqhi";
};
headers = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "d5b2e1255f706ce1f88812217e9a554f299848af";
sha256 = "18530mpa030ckjhn78z9vbfd35l5jgh3mg22ra6k8gw8zx4wjhsl";
};
};
# Update spirv-headers rev in lockstep according to DEPs file
version = "2019.1";
in
assert version == spirv-headers.version;
stdenv.mkDerivation rec {
name = "spirv-tools-${version}";
version = "2018-09-20";
inherit version;
src = spirv_sources.tools;
patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers'';
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "v${version}";
sha256 = "0vddjzhkrhrm3l3i57nxmq2smv3r1s0ka5ff2kziaahr4hqb479r";
};
enableParallelBuilding = true;
buildInputs = [ cmake python ];
passthru = {
headers = spirv_sources.headers;
};
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];
meta = with stdenv.lib; {
inherit (src.meta) homepage;