awscli2: 2.7.33 -> 2.8.5 (#197270)

This commit is contained in:
Anthony Roussel 2022-10-25 21:34:08 +02:00 committed by GitHub
parent 0079830888
commit 3689a76637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,9 @@
, groff
, less
, fetchFromGitHub
, nix-update-script
}:
let
py = python3.override {
packageOverrides = self: super: {
@ -12,7 +14,16 @@ let
src = self.fetchPypi {
inherit (oldAttrs) pname;
inherit version;
sha256 = "sha256-MGLTFcsWVC/gTdgjny6LwyOO6QRc1QcLkVzy677Lqqw=";
hash = "sha256-MGLTFcsWVC/gTdgjny6LwyOO6QRc1QcLkVzy677Lqqw=";
};
});
prompt-toolkit = super.prompt-toolkit.overridePythonAttrs (oldAttrs: rec {
version = "3.0.28";
src = self.fetchPypi {
pname = "prompt_toolkit";
inherit version;
hash = "sha256-nxzRax6GwpaPJRnX+zHdnWaZFvUVYSwmnRTp7VK1FlA=";
};
});
};
@ -21,15 +32,20 @@ let
in
with py.pkgs; buildPythonApplication rec {
pname = "awscli2";
version = "2.7.33"; # N.B: if you change this, check if overrides are still up-to-date
version = "2.8.5"; # N.B: if you change this, check if overrides are still up-to-date
format = "pyproject";
src = fetchFromGitHub {
owner = "aws";
repo = "aws-cli";
rev = version;
sha256 = "sha256-9X056Xc9DPp8BiuAeCvQrswcj7mnZKrkMOad5aP1TI8=";
sha256 = "sha256-il5vUTHRTb1Y2ofu5z8W/8S39KRmRgKXVZs1f1T8YAg=";
};
nativeBuildInputs = [
flit-core
];
propagatedBuildInputs = [
awscrt
bcdoc
@ -53,25 +69,14 @@ with py.pkgs; buildPythonApplication rec {
jsonschema
mock
pytestCheckHook
pytest-xdist
];
postPatch = ''
substituteInPlace setup.cfg \
substituteInPlace pyproject.toml \
--replace "colorama>=0.2.5,<0.4.4" "colorama" \
--replace "cryptography>=3.3.2,<37.0.0" "cryptography" \
--replace "distro>=1.5.0,<1.6.0" "distro" \
--replace "docutils>=0.10,<0.16" "docutils" \
--replace "ruamel.yaml>=0.15.0,<=0.17.21" "ruamel.yaml" \
--replace "wcwidth<0.2.0" "wcwidth" \
--replace "prompt-toolkit>=3.0.24,<3.0.29" "prompt-toolkit~=3.0" \
--replace "distro>=1.5.0,<1.6.0" "distro"
'';
checkPhase = ''
export PATH=$PATH:$out/bin
# https://github.com/NixOS/nixpkgs/issues/16144#issuecomment-225422439
export HOME=$TMP
--replace "wcwidth<0.2.0" "wcwidth"
'';
postInstall = ''
@ -87,13 +92,42 @@ with py.pkgs; buildPythonApplication rec {
rm $out/bin/aws.cmd
'';
passthru.python = py; # for aws_shell
doCheck = true;
preCheck = ''
export PATH=$PATH:$out/bin
export HOME=$(mktemp -d)
'';
pytestFlagsArray = [
"-Wignore::DeprecationWarning"
];
disabledTestPaths = [
# Integration tests require networking
"tests/integration"
# Disable slow tests (only run unit tests)
"tests/backends"
"tests/functional"
];
pythonImportsCheck = [
"awscli"
];
passthru = {
python = py; # for aws_shell
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
homepage = "https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html";
changelog = "https://github.com/aws/aws-cli/blob/${version}/CHANGELOG.rst";
description = "Unified tool to manage your AWS services";
license = licenses.asl20;
maintainers = with maintainers; [ bhipple davegallant bryanasdev000 devusb ];
maintainers = with maintainers; [ bhipple davegallant bryanasdev000 devusb anthonyroussel ];
};
}