Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 75 lines 1.7 kB view raw
1{ lib 2, nixosTests 3, python3 4, groff 5, less 6}: 7let 8 py = python3.override { 9 packageOverrides = self: super: { 10 # TODO: https://github.com/aws/aws-cli/pull/5712 11 colorama = super.colorama.overridePythonAttrs (oldAttrs: rec { 12 version = "0.4.3"; 13 src = oldAttrs.src.override { 14 inherit version; 15 sha256 = "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"; 16 }; 17 }); 18 }; 19 }; 20 21in 22with py.pkgs; buildPythonApplication rec { 23 pname = "awscli"; 24 version = "1.19.52"; # N.B: if you change this, change botocore and boto3 to a matching version too 25 26 src = fetchPypi { 27 inherit pname version; 28 sha256 = "sha256-keKyuNeDC/90pn89KjoDTO8AGsmI8nqfDNSeGyM6iHQ="; 29 }; 30 31 # https://github.com/aws/aws-cli/issues/4837 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace "docutils>=0.10,<0.16" "docutils>=0.10" 35 ''; 36 37 # No tests included 38 doCheck = false; 39 40 propagatedBuildInputs = [ 41 botocore 42 bcdoc 43 s3transfer 44 six 45 colorama 46 docutils 47 rsa 48 pyyaml 49 groff 50 less 51 ]; 52 53 postInstall = '' 54 mkdir -p $out/share/bash-completion/completions 55 echo "complete -C $out/bin/aws_completer aws" > $out/share/bash-completion/completions/awscli 56 57 mkdir -p $out/share/zsh/site-functions 58 mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions 59 60 rm $out/bin/aws.cmd 61 ''; 62 63 passthru = { 64 python = py; # for aws_shell 65 66 tests = { inherit (nixosTests) awscli; }; 67 }; 68 69 meta = with lib; { 70 homepage = "https://aws.amazon.com/cli/"; 71 description = "Unified tool to manage your AWS services"; 72 license = licenses.asl20; 73 maintainers = with maintainers; [ muflax ]; 74 }; 75}