2020-07-04 11:45:43 +01:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, lib
|
2020-11-24 15:44:33 +00:00
|
|
|
, python3
|
2020-02-11 20:38:15 +00:00
|
|
|
, enableTelemetry ? false
|
2018-06-12 14:15:06 +01:00
|
|
|
}:
|
|
|
|
|
2019-04-08 11:16:39 +01:00
|
|
|
let
|
2020-11-24 15:44:33 +00:00
|
|
|
py = python3.override {
|
2019-04-08 11:16:39 +01:00
|
|
|
packageOverrides = self: super: {
|
2019-11-26 20:26:28 +00:00
|
|
|
flask = super.flask.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "1.0.2";
|
2019-04-08 11:16:39 +01:00
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
2019-11-26 20:26:28 +00:00
|
|
|
sha256 = "0j6f4a9rpfh25k1gp7azqhnni4mb4fgy50jammgjgddw1l3w0w92";
|
2019-04-08 11:16:39 +01:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2021-01-12 02:03:10 +00:00
|
|
|
aws-sam-translator = super.aws-sam-translator.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "1.27.0";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "sha256-MlgSL0zWcbo9wUE4LdBBLBI9ufExe+2LJucin2NjRFQ=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
dateparser = super.dateparser.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.7.0";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "sha256-lAgoGDyTe87FMHUyEbcPZzwKmquDHkMnNImzEFON/4Y=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2020-01-22 13:28:59 +00:00
|
|
|
cookiecutter = super.cookiecutter.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "1.6.0";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk";
|
|
|
|
};
|
|
|
|
});
|
2019-04-08 11:16:39 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
with py.pkgs;
|
2018-06-12 14:15:06 +01:00
|
|
|
|
2018-06-22 11:49:52 +01:00
|
|
|
buildPythonApplication rec {
|
2018-06-12 14:15:06 +01:00
|
|
|
pname = "aws-sam-cli";
|
2020-10-20 00:25:55 +01:00
|
|
|
version = "1.6.2";
|
2018-06-12 14:15:06 +01:00
|
|
|
|
2018-06-22 11:49:52 +01:00
|
|
|
src = fetchPypi {
|
2018-06-12 14:15:06 +01:00
|
|
|
inherit pname version;
|
2020-10-20 00:25:55 +01:00
|
|
|
sha256 = "0scnymhhiiqrs2j0jaypxgq2wg1qf1w8f55qfay0b3nf51y6mh8y";
|
2018-06-12 14:15:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Tests are not included in the PyPI package
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-06-22 11:49:52 +01:00
|
|
|
propagatedBuildInputs = [
|
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
|
2018-06-12 14:15:06 +01:00
|
|
|
docker
|
|
|
|
flask
|
2019-04-08 11:16:39 +01:00
|
|
|
idna
|
2020-03-18 18:43:56 +00:00
|
|
|
jmespath
|
2019-04-08 11:16:39 +01:00
|
|
|
pathlib2
|
|
|
|
requests
|
|
|
|
serverlessrepo
|
2018-06-12 14:15:06 +01:00
|
|
|
six
|
2019-11-26 20:26:28 +00:00
|
|
|
tomlkit
|
2018-06-12 14:15:06 +01:00
|
|
|
];
|
|
|
|
|
2020-02-11 20:38:15 +00:00
|
|
|
postFixup = if enableTelemetry then "echo aws-sam-cli TELEMETRY IS ENABLED" else ''
|
2020-02-07 20:52:05 +00:00
|
|
|
# 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 \
|
2020-10-20 00:25:55 +01:00
|
|
|
--replace "boto3~=1.14.0, >=1.14.23" "boto3~=1.14" \
|
2021-01-12 02:03:10 +00:00
|
|
|
--replace "docker~=4.2.0" "docker~=4.3" \
|
2020-07-04 11:45:43 +01:00
|
|
|
--replace "jmespath~=0.9.5" "jmespath~=0.10.0" \
|
2020-10-20 00:25:55 +01:00
|
|
|
--replace "python-dateutil~=2.6, <2.8.1" "python-dateutil~=2.6" \
|
|
|
|
--replace "requests==2.23.0" "requests~=2.24" \
|
|
|
|
--replace "serverlessrepo==0.1.9" "serverlessrepo~=0.1.9" \
|
|
|
|
--replace "tomlkit==0.5.8" "tomlkit~=0.7.0"
|
2019-05-24 16:22:13 +01:00
|
|
|
'';
|
|
|
|
|
2018-06-12 14:15:06 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
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;
|
2020-02-11 17:16:06 +00:00
|
|
|
maintainers = with maintainers; [ andreabedini lo1tuma ];
|
2018-06-12 14:15:06 +01:00
|
|
|
};
|
|
|
|
}
|