nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, python3
3, groff
4, less
5}:
6
7let
8 py = python3.override {
9 packageOverrides = self: super: {
10 rsa = super.rsa.overridePythonAttrs (oldAttrs: rec {
11 version = "3.4.2";
12 src = oldAttrs.src.override {
13 inherit version;
14 sha256 = "25df4e10c263fb88b5ace923dd84bf9aa7f5019687b5e55382ffcdb8bede9db5";
15 };
16 });
17 };
18 };
19
20in with py.pkgs; buildPythonApplication rec {
21 pname = "awscli";
22 version = "1.17.13"; # N.B: if you change this, change botocore to a matching version too
23
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "c42fc35d4e9f82ce72b2a8b8d54df3a57fe363b0763a473e72d0006b0d1e06ff";
27 };
28
29 postPatch = ''
30 substituteInPlace setup.py --replace ",<0.16" ""
31 '';
32
33 # No tests included
34 doCheck = false;
35
36 propagatedBuildInputs = [
37 botocore
38 bcdoc
39 s3transfer
40 six
41 colorama
42 docutils
43 rsa
44 pyyaml
45 groff
46 less
47 ];
48
49 postInstall = ''
50 mkdir -p $out/etc/bash_completion.d
51 echo "complete -C $out/bin/aws_completer aws" > $out/etc/bash_completion.d/awscli
52 mkdir -p $out/share/zsh/site-functions
53 mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions
54 rm $out/bin/aws.cmd
55 '';
56
57 passthru.python = py; # for aws_shell
58
59 meta = with lib; {
60 homepage = https://aws.amazon.com/cli/;
61 description = "Unified tool to manage your AWS services";
62 license = licenses.asl20;
63 maintainers = with maintainers; [ muflax ];
64 };
65}