diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index 88da1ca54a97..ca0184beeb0c 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -76,6 +76,11 @@ let passAsFile = [ "content" ]; } else { contentPath = content; + } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) { + # post-link-hook expects codesign_allocate to be in PATH + # https://github.com/NixOS/nixpkgs/issues/154203 + # https://github.com/NixOS/nixpkgs/issues/148189 + nativeBuildInputs = [ stdenv.cc.bintools ]; }) '' ${compileScript} ${lib.optionalString strip