diff options
author | Luke Worth <luke.worth@bellroy.com> | 2022-06-20 14:29:49 +1000 |
---|---|---|
committer | Luke Worth <luke.worth@bellroy.com> | 2022-06-20 17:51:18 +1000 |
commit | b1cc6afe11cd643797cdf79168e0cd709eba164b (patch) | |
tree | c03ad0ae5348e3ff4f7fcdbb317b22d173e87274 | |
parent | 4618729d68d7542b69974b9d1d4f3d66f835c060 (diff) | |
download | nixpkgs-b1cc6afe11cd643797cdf79168e0cd709eba164b.tar nixpkgs-b1cc6afe11cd643797cdf79168e0cd709eba164b.tar.gz nixpkgs-b1cc6afe11cd643797cdf79168e0cd709eba164b.tar.bz2 nixpkgs-b1cc6afe11cd643797cdf79168e0cd709eba164b.tar.lz nixpkgs-b1cc6afe11cd643797cdf79168e0cd709eba164b.tar.xz nixpkgs-b1cc6afe11cd643797cdf79168e0cd709eba164b.tar.zst nixpkgs-b1cc6afe11cd643797cdf79168e0cd709eba164b.zip |
aws-sam-cli: 1.37.0 -> 1.52.0
-rw-r--r-- | pkgs/development/tools/aws-sam-cli/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/tools/aws-sam-cli/support-click-8-1.patch | 21 |
2 files changed, 32 insertions, 3 deletions
diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index c4fdb203c34..af2685681f1 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -5,11 +5,11 @@ python3.pkgs.buildPythonApplication rec { pname = "aws-sam-cli"; - version = "1.37.0"; + version = "1.52.0"; src = python3.pkgs.fetchPypi { inherit pname version; - hash = "sha256-XE3g2mKwAiaJvi0ShVScnCKrmz7ujaQgOeFXuYwtP4g="; + hash = "sha256-ldr0X+I5+Nfb+WBDOe0m202WOuccGUI5HFL3fpbBNPo="; }; propagatedBuildInputs = with python3.pkgs; [ @@ -36,15 +36,23 @@ python3.pkgs.buildPythonApplication rec { wrapProgram $out/bin/sam --set SAM_CLI_TELEMETRY 0 ''; + patches = [ + # Click 8.1 removed `get_terminal_size`, recommending + # `shutil.get_terminal_size` instead. + # (https://github.com/pallets/click/pull/2130) + ./support-click-8-1.patch + ]; + # fix over-restrictive version bounds postPatch = '' substituteInPlace requirements/base.txt \ --replace "aws_lambda_builders==" "aws-lambda-builders #" \ - --replace "click~=7.1" "click~=8.0" \ + --replace "click~=7.1" "click~=8.1" \ --replace "dateparser~=1.0" "dateparser>=0.7" \ --replace "docker~=4.2.0" "docker>=4.2.0" \ --replace "Flask~=1.1.2" "Flask~=2.0" \ --replace "jmespath~=0.10.0" "jmespath" \ + --replace "MarkupSafe==2.0.1" "MarkupSafe #" \ --replace "PyYAML~=5.3" "PyYAML #" \ --replace "regex==" "regex #" \ --replace "requests==" "requests #" \ diff --git a/pkgs/development/tools/aws-sam-cli/support-click-8-1.patch b/pkgs/development/tools/aws-sam-cli/support-click-8-1.patch new file mode 100644 index 00000000000..dc7af080ac6 --- /dev/null +++ b/pkgs/development/tools/aws-sam-cli/support-click-8-1.patch @@ -0,0 +1,21 @@ +diff --git a/samcli/commands/_utils/table_print.py b/samcli/commands/_utils/table_print.py +index de63af29..a9d0f2fe 100644 +--- a/samcli/commands/_utils/table_print.py ++++ b/samcli/commands/_utils/table_print.py +@@ -7,6 +7,7 @@ from functools import wraps + from typing import Sized + + import click ++import shutil + + MIN_OFFSET = 20 + +@@ -30,7 +31,7 @@ def pprint_column_names( + + def pprint_wrap(func): + # Calculate terminal width, number of columns in the table +- width, _ = click.get_terminal_size() ++ width, _ = shutil.get_terminal_size() + # For UX purposes, set a minimum width for the table to be usable + # and usable_width keeps margins in mind. + width = max(width, min_width) |