writers: make codesign_allocate available in PATH on aarch64-darwin

codesign_allocate is assumed to be in PATH:

https://github.com/NixOS/nixpkgs/issues/154203
https://github.com/NixOS/nixpkgs/issues/148189

Using an absolute reference in post-link-sign-hook would be another
possibility, but hasn't been fruitful so far:
https://github.com/NixOS/nixpkgs/pull/148282
https://github.com/NixOS/nixpkgs/pull/208120
This commit is contained in:
sternenseemann 2023-03-13 10:22:06 +01:00
parent df61cdb8e4
commit 86dbc928fb

View file

@ -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