github-copilot-cli: fix build by preserving original filename (#501183)

This commit is contained in:
Michael Daniels
2026-03-21 02:46:26 +00:00
committed by GitHub
@@ -32,12 +32,14 @@ stdenv.mkDerivation (finalAttrs: {
installPhase = ''
runHook preInstall
install -Dm755 copilot $out/bin/copilot
# Use libexec to preserve filename when calling makeBinaryWrapper
install -Dm755 copilot $out/libexec/copilot
runHook postInstall
'';
postInstall = ''
wrapProgram $out/bin/copilot \
# Filename must explictly be "copilot" for internal self-referencing
makeWrapper $out/libexec/copilot $out/bin/copilot \
--add-flags "--no-auto-update"
'';