about summary refs log tree commit diff
path: root/pkgs/development/compilers/shaderc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/shaderc/default.nix')
-rw-r--r--pkgs/development/compilers/shaderc/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/compilers/shaderc/default.nix b/pkgs/development/compilers/shaderc/default.nix
index 082c480d6e776..65938fcc22659 100644
--- a/pkgs/development/compilers/shaderc/default.nix
+++ b/pkgs/development/compilers/shaderc/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, darwin, python3 }:
+{ lib, stdenv, fetchFromGitHub, cmake, python3, autoSignDarwinBinariesHook, cctools }:
 # 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
@@ -23,7 +23,8 @@ let
     rev = "0c28b6451d77774912e52949c1e57fa726edf113";
     sha256 = "sha256-KpCMceTV/BRaoJe1qeXhKYQNQqdGaM6Q9nklpJKzHFY=";
   };
-in stdenv.mkDerivation rec {
+in
+stdenv.mkDerivation rec {
   pname = "shaderc";
   version = "2021.0";
 
@@ -42,7 +43,9 @@ in stdenv.mkDerivation rec {
     ln -s ${spirv-headers} third_party/spirv-tools/external/spirv-headers
   '';
 
-  nativeBuildInputs = [ cmake python3 ] ++ lib.optionals stdenv.isDarwin [ darwin.cctools ];
+  nativeBuildInputs = [ cmake python3 ]
+    ++ lib.optionals stdenv.isDarwin [ cctools ]
+    ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ];
 
   postInstall = ''
     moveToOutput "lib/*.a" $static