awscli: add passthru.tests.version, passthru.updateScript

This commit is contained in:
Anthony Roussel 2023-10-01 14:03:36 +02:00
parent c3688d9bb6
commit 4a5241e752
No known key found for this signature in database
GPG Key ID: 9DC4987B1A55E75E

View File

@ -3,6 +3,9 @@
, fetchPypi
, groff
, less
, nix-update-script
, testers
, awscli
}:
python3.pkgs.buildPythonApplication rec {
@ -37,10 +40,6 @@ python3.pkgs.buildPythonApplication rec {
rm $out/bin/aws.cmd
'';
passthru = {
python = python3; # for aws_shell
};
doInstallCheck = true;
installCheckPhase = ''
@ -52,6 +51,19 @@ python3.pkgs.buildPythonApplication rec {
runHook postInstallCheck
'';
passthru = {
python = python3; # for aws_shell
updateScript = nix-update-script {
# Excludes 1.x versions from the Github tags list
extraArgs = [ "--version-regex" "^(1\.(.*))" ];
};
tests.version = testers.testVersion {
package = awscli;
command = "aws --version";
inherit version;
};
};
meta = with lib; {
homepage = "https://aws.amazon.com/cli/";
changelog = "https://github.com/aws/aws-cli/blob/${version}/CHANGELOG.rst";