Merge pull request #146968 from Hoverbear/shaderc-darwin-libtool

shaderc: include darwin libtool
This commit is contained in:
Domen Kožar 2021-11-23 10:09:06 +01:00 committed by GitHub
commit 35d670f9c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, python3 }:
{ lib, stdenv, fetchFromGitHub, cmake, darwin, python3 }:
# Like many google projects, shaderc doesn't gracefully support separately compiled dependencies, so we can't easily use
# the versions of glslang and spirv-tools used by vulkan-loader. Exact revisions are taken from
# https://github.com/google/shaderc/blob/known-good/known_good.json
@ -42,7 +42,7 @@ in stdenv.mkDerivation rec {
ln -s ${spirv-headers} third_party/spirv-tools/external/spirv-headers
'';
nativeBuildInputs = [ cmake python3 ];
nativeBuildInputs = [ cmake python3 ] ++ lib.optionals stdenv.isDarwin [ darwin.cctools ];
postInstall = ''
moveToOutput "lib/*.a" $static
@ -53,6 +53,7 @@ in stdenv.mkDerivation rec {
meta = with lib; {
inherit (src.meta) homepage;
description = "A collection of tools, libraries and tests for shader compilation";
platforms = platforms.all;
license = [ licenses.asl20 ];
};
}