nixpkgs/pkgs/development/tools/aws-sam-cli/default.nix

78 lines
2 KiB
Nix
Raw Normal View History

2018-06-12 15:15:06 +02:00
{ lib
, python
}:
2019-04-08 12:16:39 +02:00
let
py = python.override {
packageOverrides = self: super: {
2019-11-26 21:26:28 +01:00
flask = super.flask.overridePythonAttrs (oldAttrs: rec {
version = "1.0.2";
2019-04-08 12:16:39 +02:00
src = oldAttrs.src.override {
inherit version;
2019-11-26 21:26:28 +01:00
sha256 = "0j6f4a9rpfh25k1gp7azqhnni4mb4fgy50jammgjgddw1l3w0w92";
2019-04-08 12:16:39 +02:00
};
});
2019-10-17 23:45:52 +02:00
jsonschema = super.jsonschema.overridePythonAttrs (oldAttrs: rec {
version = "3.1.1";
2019-04-08 12:16:39 +02:00
src = oldAttrs.src.override {
inherit version;
2019-10-17 23:45:52 +02:00
sha256 = "0grwi50v3vahvcijlw6g6q55yc5jyj0p1cmiq3rkycxnfr16i81g";
2019-04-08 12:16:39 +02:00
};
2019-10-17 23:45:52 +02:00
nativeBuildInputs = [ super.setuptools_scm ];
propagatedBuildInputs = with super; oldAttrs.propagatedBuildInputs ++ [ pyrsistent attrs importlib-metadata ];
doCheck = false;
2019-04-08 12:16:39 +02:00
});
2019-10-17 23:45:52 +02:00
2019-04-08 12:16:39 +02:00
};
};
in
with py.pkgs;
2018-06-12 15:15:06 +02:00
2018-06-22 12:49:52 +02:00
buildPythonApplication rec {
2018-06-12 15:15:06 +02:00
pname = "aws-sam-cli";
2019-11-26 21:26:28 +01:00
version = "0.34.0";
2018-06-12 15:15:06 +02:00
2018-06-22 12:49:52 +02:00
src = fetchPypi {
2018-06-12 15:15:06 +02:00
inherit pname version;
2019-11-26 21:26:28 +01:00
sha256 = "1ndgcbd6zr23lvmqn4wikgvnlwl0gj0wgyawaspwm3b0jlvxadik";
2018-06-12 15:15:06 +02:00
};
# Tests are not included in the PyPI package
doCheck = false;
2018-06-22 12:49:52 +02:00
propagatedBuildInputs = [
2019-04-08 12:16:39 +02:00
aws-lambda-builders
2018-06-12 15:15:06 +02:00
aws-sam-translator
2019-04-08 12:16:39 +02:00
chevron
2018-06-12 15:15:06 +02:00
click
cookiecutter
2018-07-30 08:23:44 +02:00
dateparser
2018-06-12 15:15:06 +02:00
docker
flask
2019-04-08 12:16:39 +02:00
idna
pathlib2
requests
serverlessrepo
2018-06-12 15:15:06 +02:00
six
2019-11-26 21:26:28 +01:00
tomlkit
2018-06-12 15:15:06 +02:00
];
2019-10-17 23:45:52 +02:00
# fix over-restrictive version bounds
2019-05-24 17:22:13 +02:00
postPatch = ''
substituteInPlace requirements/base.txt --replace "requests==2.20.1" "requests==2.22.0"
2019-10-17 23:45:52 +02:00
substituteInPlace requirements/base.txt --replace "serverlessrepo==0.1.9" "serverlessrepo~=0.1.9"
2019-05-24 17:22:13 +02:00
substituteInPlace requirements/base.txt --replace "six~=1.11.0" "six~=1.12.0"
2019-05-25 14:43:54 +02:00
substituteInPlace requirements/base.txt --replace "PyYAML~=3.12" "PyYAML~=5.1"
2019-05-24 17:22:13 +02:00
'';
2018-06-12 15:15:06 +02: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;
2019-04-08 12:16:39 +02:00
maintainers = with maintainers; [ andreabedini dhkl ];
2018-06-12 15:15:06 +02:00
};
}