1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/development/tools/aws-sam-cli/default.nix

81 lines
1.9 KiB
Nix
Raw Normal View History

2018-06-12 09:15:06 -04:00
{ lib
, python
, enableTelemetry ? false
2018-06-12 09:15:06 -04:00
}:
2019-04-08 06:16:39 -04:00
let
py = python.override {
packageOverrides = self: super: {
2019-11-26 15:26:28 -05:00
flask = super.flask.overridePythonAttrs (oldAttrs: rec {
version = "1.0.2";
2019-04-08 06:16:39 -04:00
src = oldAttrs.src.override {
inherit version;
2019-11-26 15:26:28 -05:00
sha256 = "0j6f4a9rpfh25k1gp7azqhnni4mb4fgy50jammgjgddw1l3w0w92";
2019-04-08 06:16:39 -04:00
};
});
2020-01-22 08:28:59 -05:00
cookiecutter = super.cookiecutter.overridePythonAttrs (oldAttrs: rec {
version = "1.6.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk";
};
});
2019-04-08 06:16:39 -04:00
};
};
in
with py.pkgs;
2018-06-12 09:15:06 -04:00
2018-06-22 06:49:52 -04:00
buildPythonApplication rec {
2018-06-12 09:15:06 -04:00
pname = "aws-sam-cli";
2020-03-18 14:43:56 -04:00
version = "0.44.0";
2018-06-12 09:15:06 -04:00
2018-06-22 06:49:52 -04:00
src = fetchPypi {
2018-06-12 09:15:06 -04:00
inherit pname version;
2020-03-18 14:43:56 -04:00
sha256 = "0r3m41xjmg8m2jwsqwc9kdkcs3xbz8dsl240ybwbnr7rp29pnirf";
2018-06-12 09:15:06 -04:00
};
# Tests are not included in the PyPI package
doCheck = false;
2018-06-22 06:49:52 -04:00
propagatedBuildInputs = [
2019-04-08 06:16:39 -04:00
aws-lambda-builders
2018-06-12 09:15:06 -04:00
aws-sam-translator
2019-04-08 06:16:39 -04:00
chevron
2018-06-12 09:15:06 -04:00
click
cookiecutter
2018-07-30 02:23:44 -04:00
dateparser
2018-06-12 09:15:06 -04:00
docker
flask
2019-04-08 06:16:39 -04:00
idna
2020-03-18 14:43:56 -04:00
jmespath
2019-04-08 06:16:39 -04:00
pathlib2
requests
serverlessrepo
2018-06-12 09:15:06 -04:00
six
2019-11-26 15:26:28 -05:00
tomlkit
2018-06-12 09:15:06 -04: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 17:45:52 -04:00
# fix over-restrictive version bounds
2019-05-24 11:22:13 -04:00
postPatch = ''
2019-12-10 02:01:59 -05:00
substituteInPlace requirements/base.txt \
--replace "serverlessrepo==0.1.9" "serverlessrepo~=0.1.9" \
--replace "python-dateutil~=2.6, <2.8.1" "python-dateutil~=2.6" \
2020-03-18 14:43:56 -04:00
--replace "tomlkit==0.5.8" "tomlkit~=0.5.8" \
2019-05-24 11:22:13 -04:00
'';
2018-06-12 09:15:06 -04: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;
maintainers = with maintainers; [ andreabedini lo1tuma ];
2018-06-12 09:15:06 -04:00
};
}