pi-coding-agent: remove vendored Linux binaries on Darwin (#515817)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
writableTmpDirAsHomeHook,
|
||||
ripgrep,
|
||||
makeBinaryWrapper,
|
||||
stdenvNoCC,
|
||||
}:
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "pi-coding-agent";
|
||||
@@ -65,7 +66,17 @@ buildNpmPackage (finalAttrs: {
|
||||
|
||||
# Clean up now-dangling .bin symlinks
|
||||
find "$nm/.bin" -xtype l -delete
|
||||
''
|
||||
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
|
||||
# Remove foreign Linux binaries that make audit-tmpdir try to inspect ELF
|
||||
# RPATHs with patchelf
|
||||
find "$nm/koffi/build/koffi" -mindepth 1 -maxdepth 1 -type d \
|
||||
! -name 'darwin_*' -exec rm -r {} +
|
||||
rm -rf \
|
||||
"$nm/@anthropic-ai/sandbox-runtime/dist/vendor/seccomp" \
|
||||
"$nm/@anthropic-ai/sandbox-runtime/vendor/seccomp"
|
||||
'';
|
||||
|
||||
postFixup = "wrapProgram $out/bin/pi --prefix PATH : ${lib.makeBinPath [ ripgrep ]}";
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
Reference in New Issue
Block a user