nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.09-alpha 86 lines 2.4 kB view raw
1{ lib 2, python3 3, groff 4, less 5, fetchFromGitHub 6}: 7let 8 py = python3.override { 9 packageOverrides = self: super: { 10 botocore = super.botocore.overridePythonAttrs (oldAttrs: rec { 11 version = "2.0.0dev50"; 12 src = fetchFromGitHub { 13 owner = "boto"; 14 repo = "botocore"; 15 rev = "e3dceaf9052cc8e221ea757207d5ba37054af2b8"; 16 sha256 = "0fcf78il4z6gr4gg0jy2h5045ifkslsgldnk6zyvzcl5gykp8i2f"; 17 }; 18 }); 19 prompt_toolkit = super.prompt_toolkit.overridePythonAttrs (oldAttrs: rec { 20 version = "2.0.10"; 21 src = oldAttrs.src.override { 22 inherit version; 23 sha256 = "1nr990i4b04rnlw1ghd0xmgvvvhih698mb6lb6jylr76cs7zcnpi"; 24 }; 25 }); 26 }; 27 }; 28 29in 30with py.pkgs; buildPythonApplication rec { 31 pname = "awscli2"; 32 version = "2.0.46"; # N.B: if you change this, change botocore to a matching version too 33 34 src = fetchFromGitHub { 35 owner = "aws"; 36 repo = "aws-cli"; 37 rev = version; 38 hash = "sha256:10bq4m7hsmj1m7nwr3jgpfvm8bx091vl2hig574r1bjmsi32vy58"; 39 }; 40 41 postPatch = '' 42 substituteInPlace setup.py --replace "cryptography>=2.8.0,<=2.9.0" "cryptography>=2.8.0" 43 substituteInPlace setup.py --replace "docutils>=0.10,<0.16" "docutils>=0.10" 44 substituteInPlace setup.py --replace "ruamel.yaml>=0.15.0,<0.16.0" "ruamel.yaml>=0.15.0" 45 substituteInPlace setup.py --replace "wcwidth<0.2.0" "wcwidth" 46 ''; 47 48 # No tests included 49 doCheck = false; 50 51 propagatedBuildInputs = [ 52 bcdoc 53 botocore 54 colorama 55 cryptography 56 distro 57 docutils 58 groff 59 less 60 prompt_toolkit 61 pyyaml 62 rsa 63 ruamel_yaml 64 s3transfer 65 six 66 wcwidth 67 ]; 68 69 postInstall = '' 70 mkdir -p $out/etc/bash_completion.d 71 echo "complete -C $out/bin/aws_completer aws" > $out/etc/bash_completion.d/awscli 72 mkdir -p $out/share/zsh/site-functions 73 mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions 74 rm $out/bin/aws.cmd 75 ''; 76 77 passthru.python = py; # for aws_shell 78 79 meta = with lib; { 80 homepage = "https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html"; 81 changelog = "https://github.com/aws/aws-cli/blob/${version}/CHANGELOG.rst"; 82 description = "Unified tool to manage your AWS services"; 83 license = licenses.asl20; 84 maintainers = with maintainers; [ bhipple davegallant ]; 85 }; 86}