Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11-beta 75 lines 1.7 kB view raw
1{ lib 2, python3 3, fetchPypi 4, groff 5, less 6, nix-update-script 7, testers 8, awscli 9}: 10 11python3.pkgs.buildPythonApplication rec { 12 pname = "awscli"; 13 version = "1.30.2"; # N.B: if you change this, change botocore and boto3 to a matching version too 14 15 src = fetchPypi { 16 inherit pname version; 17 hash = "sha256-XbYsPbYUIJPCS+nhcE3A5K7yxHcGUkulT5vHPT5T9kM="; 18 }; 19 20 21 propagatedBuildInputs = with python3.pkgs; [ 22 botocore 23 bcdoc 24 s3transfer 25 colorama 26 docutils 27 rsa 28 pyyaml 29 groff 30 less 31 ]; 32 33 postInstall = '' 34 mkdir -p $out/share/bash-completion/completions 35 echo "complete -C $out/bin/aws_completer aws" > $out/share/bash-completion/completions/awscli 36 37 mkdir -p $out/share/zsh/site-functions 38 mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions 39 40 rm $out/bin/aws.cmd 41 ''; 42 43 doInstallCheck = true; 44 45 installCheckPhase = '' 46 runHook preInstallCheck 47 48 $out/bin/aws --version | grep "${python3.pkgs.botocore.version}" 49 $out/bin/aws --version | grep "${version}" 50 51 runHook postInstallCheck 52 ''; 53 54 passthru = { 55 python = python3; # for aws_shell 56 updateScript = nix-update-script { 57 # Excludes 1.x versions from the Github tags list 58 extraArgs = [ "--version-regex" "^(1\.(.*))" ]; 59 }; 60 tests.version = testers.testVersion { 61 package = awscli; 62 command = "aws --version"; 63 inherit version; 64 }; 65 }; 66 67 meta = with lib; { 68 homepage = "https://aws.amazon.com/cli/"; 69 changelog = "https://github.com/aws/aws-cli/blob/${version}/CHANGELOG.rst"; 70 description = "Unified tool to manage your AWS services"; 71 license = licenses.asl20; 72 mainProgram = "aws"; 73 maintainers = with maintainers; [ anthonyroussel ]; 74 }; 75}