gh: use --set-default for GH_TELEMETRY env var

(cherry picked from commit b120931e57)
This commit is contained in:
Marie Ramlow
2026-04-30 20:32:28 +02:00
committed by Michael Daniels
parent d954bef262
commit bd623dbb5e

View File

@@ -7,7 +7,6 @@
testers,
gh,
makeWrapper,
enableTelemetry ? false,
}:
buildGo126Module rec {
@@ -39,10 +38,8 @@ buildGo126Module rec {
installPhase = ''
runHook preInstall
install -Dm755 bin/gh -t $out/bin
''
+ lib.optionalString (!enableTelemetry) ''
wrapProgram $out/bin/gh \
--set GH_TELEMETRY false
--set-default GH_TELEMETRY false
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installManPage share/man/*/*.[1-9]