8 , enableTelemetry ? false
11 python3.pkgs.buildPythonApplication rec {
12 pname = "aws-sam-cli";
16 disabled = python3.pythonOlder "3.8";
18 src = fetchFromGitHub {
21 rev = "refs/tags/v${version}";
22 hash = "sha256-VYcgKnTNMuF4lMjoyHk0mDYTngFIouqnPZXpZ5gt9hQ=";
25 build-system = with python3.pkgs; [
45 dependencies = with python3.pkgs; [
67 ] ++ (with python3.pkgs.boto3-stubs.optional-dependencies; [
85 # Disable telemetry: https://github.com/aws/aws-sam-cli/issues/1272
86 wrapProgram $out/bin/sam \
87 --set SAM_CLI_TELEMETRY ${if enableTelemetry then "1" else "0"} \
88 --prefix PATH : $out/bin:${lib.makeBinPath [ git ]}
91 nativeCheckInputs = with python3.pkgs; [
102 export HOME=$(mktemp -d)
103 export PATH="$PATH:$out/bin:${lib.makeBinPath [ git ]}"
110 "ignore::DeprecationWarning"
113 disabledTestPaths = [
114 # Disable tests that requires networking or complex setup
119 "tests/unit/lib/telemetry"
120 # Disable flaky tests
121 "tests/unit/lib/samconfig/test_samconfig.py"
125 # Disable flaky tests
127 "test_delete_deployment"
128 "test_request_with_no_data"
131 pythonImportsCheck = [
136 tests.version = testers.testVersion {
137 package = aws-sam-cli;
138 command = "sam --version";
140 updateScript = nix-update-script {
141 extraArgs = [ "--version-regex" "^v([0-9.]+)$" ];
145 __darwinAllowLocalNetworking = true;
148 description = "CLI tool for local development and testing of Serverless applications";
149 homepage = "https://github.com/aws/aws-sam-cli";
150 changelog = "https://github.com/aws/aws-sam-cli/releases/tag/v${version}";
151 license = licenses.asl20;
153 maintainers = with maintainers; [ lo1tuma anthonyroussel ];