From e6cfc620633e2fc8344d842aa00bc8c089ea41fb Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Sat, 2 Apr 2016 20:34:50 +0100 Subject: glslang: init at 20160727 --- pkgs/development/compilers/glslang/default.nix | 22 ++++++++++++++++++ .../compilers/glslang/install-headers.patch | 26 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/compilers/glslang/default.nix create mode 100644 pkgs/development/compilers/glslang/install-headers.patch (limited to 'pkgs/development/compilers/glslang') diff --git a/pkgs/development/compilers/glslang/default.nix b/pkgs/development/compilers/glslang/default.nix new file mode 100644 index 0000000000000..3d0785f702cc2 --- /dev/null +++ b/pkgs/development/compilers/glslang/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchFromGitHub, cmake, bison }: + +stdenv.mkDerivation rec { + name = "glslang-${version}"; + version = "2016-07-27"; + + src = fetchFromGitHub { + owner = "KhronosGroup"; + repo = "glslang"; + rev = "8c8505c60454549181d78301933f3f108e2f55e6"; + sha256 = "1219sq86pz6k8nzg9sqm34b0rdv6kkjirg54y6b2r5ak568r4kwx"; + }; + + patches = [ ./install-headers.patch ]; + + buildInputs = [ cmake bison ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Khronos reference front-end for GLSL and ESSL"; + }; +} diff --git a/pkgs/development/compilers/glslang/install-headers.patch b/pkgs/development/compilers/glslang/install-headers.patch new file mode 100644 index 0000000000000..73b31ae3a67c8 --- /dev/null +++ b/pkgs/development/compilers/glslang/install-headers.patch @@ -0,0 +1,26 @@ +diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt +index 50cda68..d4ba381 100755 +--- a/SPIRV/CMakeLists.txt ++++ b/SPIRV/CMakeLists.txt +@@ -26,3 +26,8 @@ endif(WIN32) + + install(TARGETS SPIRV + ARCHIVE DESTINATION lib) ++ ++foreach(file ${HEADERS}) ++ get_filename_component(dir ${file} DIRECTORY) ++ install(FILES ${file} DESTINATION include/SPIRV/${dir}) ++endforeach() +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index 28f4742..5a25cbb 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -87,3 +87,8 @@ endif(WIN32) + + install(TARGETS glslang + ARCHIVE DESTINATION lib) ++ ++foreach(file ${HEADERS}) ++ get_filename_component(dir ${file} DIRECTORY) ++ install(FILES ${file} DESTINATION include/glslang/${dir}) ++endforeach() -- cgit 1.4.1