diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index 9b3b39ba1069..936aebf22e5d 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -1,5 +1,6 @@ { lib , python +, enableTelemetry ? false }: let @@ -56,6 +57,11 @@ buildPythonApplication rec { tomlkit ]; + postFixup = if enableTelemetry then "echo aws-sam-cli TELEMETRY IS ENABLED" else '' + # Disable telemetry: https://github.com/awslabs/aws-sam-cli/issues/1272 + wrapProgram $out/bin/sam --set SAM_CLI_TELEMETRY 0 + ''; + # fix over-restrictive version bounds postPatch = '' substituteInPlace requirements/base.txt \