From e86fa71ba6785a563ae3c8b7ce4c8cf72f6ce3c0 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Sun, 21 Nov 2021 21:02:04 -0800 Subject: [PATCH 1/2] shaderc: include darwin libtool Signed-off-by: Ana Hobden --- pkgs/development/compilers/shaderc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/shaderc/default.nix b/pkgs/development/compilers/shaderc/default.nix index 40c216d79c34..54238348f06d 100644 --- a/pkgs/development/compilers/shaderc/default.nix +++ b/pkgs/development/compilers/shaderc/default.nix @@ -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 darwin.cctools python3 ]; postInstall = '' moveToOutput "lib/*.a" $static From bcb0427773687c04ee2c1c59e30d86ca31ef8942 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Mon, 22 Nov 2021 09:42:23 -0800 Subject: [PATCH 2/2] libtool: add meta.platforms and make cctools Darwin only Signed-off-by: Ana Hobden --- pkgs/development/compilers/shaderc/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/shaderc/default.nix b/pkgs/development/compilers/shaderc/default.nix index 54238348f06d..ae9d0f8810e6 100644 --- a/pkgs/development/compilers/shaderc/default.nix +++ b/pkgs/development/compilers/shaderc/default.nix @@ -42,7 +42,7 @@ in stdenv.mkDerivation rec { ln -s ${spirv-headers} third_party/spirv-tools/external/spirv-headers ''; - nativeBuildInputs = [ cmake darwin.cctools 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 ]; }; }