3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/aws-sam-cli/default.nix

58 lines
1.5 KiB
Nix
Raw Normal View History

2021-02-16 22:22:49 +00:00
{ lib
2020-11-24 15:44:33 +00:00
, python3
, enableTelemetry ? false
2018-06-12 14:15:06 +01:00
}:
2020-11-24 16:22:13 +00:00
python3.pkgs.buildPythonApplication rec {
2018-06-12 14:15:06 +01:00
pname = "aws-sam-cli";
version = "1.26.0";
2018-06-12 14:15:06 +01:00
2020-11-24 16:22:13 +00:00
src = python3.pkgs.fetchPypi {
2018-06-12 14:15:06 +01:00
inherit pname version;
sha256 = "11aqdwhs7wa6cp9zijqi4in3zvwirfnlcy45rrnsq0jdsh3i9hbh";
2018-06-12 14:15:06 +01:00
};
# Tests are not included in the PyPI package
doCheck = false;
2020-11-24 16:22:13 +00:00
propagatedBuildInputs = with python3.pkgs; [
2019-04-08 11:16:39 +01:00
aws-lambda-builders
2018-06-12 14:15:06 +01:00
aws-sam-translator
2019-04-08 11:16:39 +01:00
chevron
2018-06-12 14:15:06 +01:00
click
cookiecutter
2018-07-30 07:23:44 +01:00
dateparser
2020-11-24 16:22:13 +00:00
python-dateutil
2018-06-12 14:15:06 +01:00
docker
flask
2020-03-18 18:43:56 +00:00
jmespath
2019-04-08 11:16:39 +01:00
requests
serverlessrepo
2019-11-26 20:26:28 +00:00
tomlkit
2020-11-24 16:22:13 +00:00
watchdog
2018-06-12 14:15:06 +01: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
'';
2019-10-17 22:45:52 +01:00
# fix over-restrictive version bounds
2019-05-24 16:22:13 +01:00
postPatch = ''
2019-12-10 07:01:59 +00:00
substituteInPlace requirements/base.txt \
--replace "click~=7.1" "click~=8.0" \
--replace "Flask~=1.1.2" "Flask~=2.0" \
2020-11-24 16:22:13 +00:00
--replace "dateparser~=0.7" "dateparser>=0.7" \
--replace "docker~=4.2.0" "docker>=4.2.0" \
--replace "requests==2.23.0" "requests~=2.24" \
2020-11-24 16:22:13 +00:00
--replace "watchdog==0.10.3" "watchdog"
2019-05-24 16:22:13 +01:00
'';
2018-06-12 14:15:06 +01:00
meta = with lib; {
homepage = "https://github.com/awslabs/aws-sam-cli";
2018-06-12 14:15:06 +01:00
description = "CLI tool for local development and testing of Serverless applications";
license = licenses.asl20;
maintainers = with maintainers; [ lo1tuma ];
2018-06-12 14:15:06 +01:00
};
}