glslang-git: 2018-06-21 -> 2018-07-27

This commit is contained in:
Benjamin Saunders 2018-08-16 23:04:30 -07:00
parent 556c27e457
commit c36382da72

View File

@ -1,20 +1,28 @@
{ stdenv, fetchFromGitHub, cmake, bison, spirv-tools, jq }:
{ stdenv, fetchFromGitHub, fetchpatch, cmake, bison, spirv-tools, jq }:
stdenv.mkDerivation rec {
name = "glslang-git-${version}";
version = "2018-06-21";
version = "2018-07-27";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "ef1f899b5d64a9628023f1bb129198674cba2b97";
sha256 = "052w6rahmy1wlphv533wz8nyn82icky28lprvl8w3acfq3831zg6";
rev = "e99a26810f65314183163c07664a40e05647c15f";
sha256 = "1w11z518xfbnf34xgzg1mp3xicpw2qmpcvaixlzw79s9ifqg5lqs";
};
patches = [
# spirv-tools bump for vulkan sdk 1.1.82.1; remove on update
(fetchpatch {
url = "https://github.com/lenny-lunarg/glslang/commit/c7f4e818ac55f545289f87f8c37571b2eadcde86.patch";
sha256 = "197293alxjdpm3x1vd6pksdb1d9za42vlyn8yn2w786av0l7vf1k";
})
];
buildInputs = [ cmake bison jq ] ++ spirv-tools.buildInputs;
enableParallelBuilding = true;
patchPhase = ''
postPatch = ''
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
ln -s "${spirv-tools.headers}" External/spirv-tools/external/spirv-headers
'';
@ -23,7 +31,7 @@ stdenv.mkDerivation rec {
HEADERS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools/external/spirv-headers"))[0].commit')
TOOLS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools"))[0].commit')
if [ "$HEADERS_COMMIT" != "${spirv-tools.headers.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then
echo "ERROR: spirv-tools commits do not match expected versions";
echo "ERROR: spirv-tools commits do not match expected versions: expected tools at $TOOLS_COMMIT, headers at $HEADERS_COMMIT";
exit 1;
fi
'';