2021-02-17 17:02:09 +00:00
|
|
|
{ lib
|
2020-11-30 08:33:03 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableTelemetry ? false
|
|
|
|
}:
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "aws-sam-cli";
|
2021-02-13 14:23:35 +00:00
|
|
|
version = "1.14.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = python3.pkgs.fetchPypi {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit pname version;
|
2021-02-13 14:23:35 +00:00
|
|
|
sha256 = "E+xIS0Z3M/ilBswH8XwXWnGb9gbDRuuKKE39qau9fFc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Tests are not included in the PyPI package
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
aws-lambda-builders
|
|
|
|
aws-sam-translator
|
|
|
|
chevron
|
|
|
|
click
|
|
|
|
cookiecutter
|
|
|
|
dateparser
|
2021-02-13 14:23:35 +00:00
|
|
|
python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
docker
|
|
|
|
flask
|
|
|
|
jmespath
|
|
|
|
requests
|
|
|
|
serverlessrepo
|
|
|
|
tomlkit
|
2021-02-13 14:23:35 +00:00
|
|
|
watchdog
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 \
|
2021-02-13 14:23:35 +00:00
|
|
|
--replace "boto3~=1.14.23" "boto3~=1.14" \
|
|
|
|
--replace "dateparser~=0.7" "dateparser>=0.7" \
|
|
|
|
--replace "docker~=4.2.0" "docker>=4.2.0" \
|
2020-10-20 17:27:49 +00:00
|
|
|
--replace "python-dateutil~=2.6, <2.8.1" "python-dateutil~=2.6" \
|
|
|
|
--replace "requests==2.23.0" "requests~=2.24" \
|
2021-02-13 14:23:35 +00:00
|
|
|
--replace "watchdog==0.10.3" "watchdog"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/awslabs/aws-sam-cli";
|
|
|
|
description = "CLI tool for local development and testing of Serverless applications";
|
|
|
|
license = licenses.asl20;
|
2021-02-13 14:23:35 +00:00
|
|
|
maintainers = with maintainers; [ lo1tuma ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|