2021-02-16 14:22:49 -08:00
|
|
|
{ lib
|
2020-11-24 07:44:33 -08:00
|
|
|
, python3
|
2020-02-11 12:38:15 -08:00
|
|
|
, enableTelemetry ? false
|
2018-06-12 06:15:06 -07:00
|
|
|
}:
|
|
|
|
|
2020-11-24 08:22:13 -08:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2018-06-12 06:15:06 -07:00
|
|
|
pname = "aws-sam-cli";
|
2020-11-24 08:22:13 -08:00
|
|
|
version = "1.14.0";
|
2018-06-12 06:15:06 -07:00
|
|
|
|
2020-11-24 08:22:13 -08:00
|
|
|
src = python3.pkgs.fetchPypi {
|
2018-06-12 06:15:06 -07:00
|
|
|
inherit pname version;
|
2020-11-24 08:22:13 -08:00
|
|
|
sha256 = "E+xIS0Z3M/ilBswH8XwXWnGb9gbDRuuKKE39qau9fFc=";
|
2018-06-12 06:15:06 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
# Tests are not included in the PyPI package
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-11-24 08:22:13 -08:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2019-04-08 03:16:39 -07:00
|
|
|
aws-lambda-builders
|
2018-06-12 06:15:06 -07:00
|
|
|
aws-sam-translator
|
2019-04-08 03:16:39 -07:00
|
|
|
chevron
|
2018-06-12 06:15:06 -07:00
|
|
|
click
|
|
|
|
cookiecutter
|
2018-07-29 23:23:44 -07:00
|
|
|
dateparser
|
2020-11-24 08:22:13 -08:00
|
|
|
python-dateutil
|
2018-06-12 06:15:06 -07:00
|
|
|
docker
|
|
|
|
flask
|
2020-03-18 11:43:56 -07:00
|
|
|
jmespath
|
2019-04-08 03:16:39 -07:00
|
|
|
requests
|
|
|
|
serverlessrepo
|
2019-11-26 12:26:28 -08:00
|
|
|
tomlkit
|
2020-11-24 08:22:13 -08:00
|
|
|
watchdog
|
2018-06-12 06:15:06 -07:00
|
|
|
];
|
|
|
|
|
2020-02-11 12:38:15 -08:00
|
|
|
postFixup = if enableTelemetry then "echo aws-sam-cli TELEMETRY IS ENABLED" else ''
|
2020-02-07 12:52:05 -08:00
|
|
|
# Disable telemetry: https://github.com/awslabs/aws-sam-cli/issues/1272
|
|
|
|
wrapProgram $out/bin/sam --set SAM_CLI_TELEMETRY 0
|
|
|
|
'';
|
|
|
|
|
2019-10-17 14:45:52 -07:00
|
|
|
# fix over-restrictive version bounds
|
2019-05-24 08:22:13 -07:00
|
|
|
postPatch = ''
|
2019-12-09 23:01:59 -08:00
|
|
|
substituteInPlace requirements/base.txt \
|
2020-11-24 08:22:13 -08: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-19 16:25:55 -07:00
|
|
|
--replace "python-dateutil~=2.6, <2.8.1" "python-dateutil~=2.6" \
|
|
|
|
--replace "requests==2.23.0" "requests~=2.24" \
|
2020-11-24 08:22:13 -08:00
|
|
|
--replace "watchdog==0.10.3" "watchdog"
|
2019-05-24 08:22:13 -07:00
|
|
|
'';
|
|
|
|
|
2018-06-12 06:15:06 -07:00
|
|
|
meta = with lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/awslabs/aws-sam-cli";
|
2018-06-12 06:15:06 -07:00
|
|
|
description = "CLI tool for local development and testing of Serverless applications";
|
|
|
|
license = licenses.asl20;
|
2021-02-11 22:48:26 -08:00
|
|
|
maintainers = with maintainers; [ lo1tuma ];
|
2018-06-12 06:15:06 -07:00
|
|
|
};
|
|
|
|
}
|