nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 75 lines 1.8 kB view raw
1{ lib 2, python 3}: 4 5let 6 py = python.override { 7 packageOverrides = self: super: { 8 flask = super.flask.overridePythonAttrs (oldAttrs: rec { 9 version = "1.0.2"; 10 src = oldAttrs.src.override { 11 inherit version; 12 sha256 = "0j6f4a9rpfh25k1gp7azqhnni4mb4fgy50jammgjgddw1l3w0w92"; 13 }; 14 }); 15 16 cookiecutter = super.cookiecutter.overridePythonAttrs (oldAttrs: rec { 17 version = "1.6.0"; 18 src = oldAttrs.src.override { 19 inherit version; 20 sha256 = "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"; 21 }; 22 }); 23 }; 24 }; 25 26in 27 28with py.pkgs; 29 30buildPythonApplication rec { 31 pname = "aws-sam-cli"; 32 version = "0.40.0"; 33 34 src = fetchPypi { 35 inherit pname version; 36 sha256 = "1vlg5fdkq5xr4v3a86gyxbbrx4rzdspbv62ki7q8yq8xdja1qz05"; 37 }; 38 39 # Tests are not included in the PyPI package 40 doCheck = false; 41 42 propagatedBuildInputs = [ 43 aws-lambda-builders 44 aws-sam-translator 45 chevron 46 click 47 cookiecutter 48 dateparser 49 docker 50 flask 51 idna 52 pathlib2 53 requests 54 serverlessrepo 55 six 56 tomlkit 57 ]; 58 59 # fix over-restrictive version bounds 60 postPatch = '' 61 substituteInPlace requirements/base.txt \ 62 --replace "requests==2.20.1" "requests==2.22.0" \ 63 --replace "serverlessrepo==0.1.9" "serverlessrepo~=0.1.9" \ 64 --replace "six~=1.11.0" "six~=1.12.0" \ 65 --replace "python-dateutil~=2.6, <2.8.1" "python-dateutil~=2.6" \ 66 --replace "PyYAML~=3.12" "PyYAML~=5.1" 67 ''; 68 69 meta = with lib; { 70 homepage = https://github.com/awslabs/aws-sam-cli; 71 description = "CLI tool for local development and testing of Serverless applications"; 72 license = licenses.asl20; 73 maintainers = with maintainers; [ andreabedini dhkl ]; 74 }; 75}