1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/compilers/glslang/default.nix

39 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, bison, spirv-tools, jq }:
2016-04-02 20:34:50 +01:00
stdenv.mkDerivation rec {
name = "glslang-git-${version}";
2018-06-27 04:30:48 +01:00
version = "2018-06-21";
2016-04-02 20:34:50 +01:00
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
2018-06-27 04:30:48 +01:00
rev = "ef1f899b5d64a9628023f1bb129198674cba2b97";
sha256 = "052w6rahmy1wlphv533wz8nyn82icky28lprvl8w3acfq3831zg6";
2016-04-02 20:34:50 +01:00
};
buildInputs = [ cmake bison jq ] ++ spirv-tools.buildInputs;
enableParallelBuilding = true;
2016-04-02 20:34:50 +01:00
patchPhase = ''
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
ln -s "${spirv-tools.headers}" External/spirv-tools/external/spirv-headers
'';
preConfigure = ''
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";
exit 1;
fi
'';
2016-04-02 20:34:50 +01:00
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Khronos reference front-end for GLSL and ESSL";
license = licenses.asl20;
platforms = platforms.linux;
2017-04-01 20:28:59 +01:00
maintainers = [ maintainers.ralith ];
2016-04-02 20:34:50 +01:00
};
}