nixpkgs-suyu/pkgs/development/compilers/glslang/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchFromGitHub
2019-08-07 00:45:23 +02:00
, bison
, cmake
, jq
, python3
, spirv-headers
, spirv-tools
}:
2016-04-02 21:34:50 +02:00
stdenv.mkDerivation rec {
2019-08-07 00:45:23 +02:00
pname = "glslang";
version = "1.3.211.0";
2016-04-02 21:34:50 +02:00
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "sdk-${version}";
sha256 = "sha256-YLn/Mxuk6mXPGtBBgfwky5Nl1TCAW6i2g+AZLzqVz+A=";
2019-08-07 00:45:23 +02:00
};
# These get set at all-packages, keep onto them for child drvs
passthru = {
spirv-tools = spirv-tools;
spirv-headers = spirv-headers;
2016-04-02 21:34:50 +02:00
};
2019-08-07 00:45:23 +02:00
nativeBuildInputs = [ cmake python3 bison jq ];
2016-04-02 21:34:50 +02:00
2018-08-17 08:04:30 +02:00
postPatch = ''
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
'';
2022-01-16 16:12:12 +01:00
# This is a dirty fix for lib/cmake/SPIRVTargets.cmake:51 which includes this directory
postInstall = ''
mkdir $out/include/External
'';
meta = with lib; {
2016-04-02 21:34:50 +02:00
inherit (src.meta) homepage;
description = "Khronos reference front-end for GLSL and ESSL";
license = licenses.asl20;
platforms = platforms.unix;
2017-04-01 21:28:59 +02:00
maintainers = [ maintainers.ralith ];
2016-04-02 21:34:50 +02:00
};
}