12 self = python3.pkgs.buildPythonApplication rec {
14 # N.B: if you change this, change botocore and boto3 to a matching version too
15 # check e.g. https://github.com/aws/aws-cli/blob/1.33.21/setup.py
20 inherit pname version;
21 hash = "sha256-7RdAqXdCnS7dzkGQHJHclR2KuBbSbd+epGMQDbDlYxY=";
25 # botocore must not be relaxed
32 python3.pkgs.setuptools
35 dependencies = with python3.pkgs; [
47 mkdir -p $out/share/bash-completion/completions
48 echo "complete -C $out/bin/aws_completer aws" > $out/share/bash-completion/completions/awscli
50 mkdir -p $out/share/zsh/site-functions
51 mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions
56 doInstallCheck = true;
58 installCheckPhase = ''
59 runHook preInstallCheck
61 $out/bin/aws --version | grep "${python3.pkgs.botocore.version}"
62 $out/bin/aws --version | grep "${version}"
64 runHook postInstallCheck
68 python = python3; # for aws_shell
69 updateScript = nix-update-script {
70 extraArgs = [ "--version=skip" ];
72 tests.version = testers.testVersion {
74 command = "aws --version";
80 homepage = "https://aws.amazon.com/cli/";
81 changelog = "https://github.com/aws/aws-cli/blob/${version}/CHANGELOG.rst";
82 description = "Unified tool to manage your AWS services";
83 license = lib.licenses.asl20;
85 maintainers = with lib.maintainers; [ anthonyroussel ];
89 assert self ? pythonRelaxDeps -> !(lib.elem "botocore" self.pythonRelaxDeps);