-
Notifications
You must be signed in to change notification settings - Fork 0
/
awscli2.nix
78 lines (69 loc) · 2.11 KB
/
awscli2.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
self: super:
rec {
python3 = with super; super.python3.override {
packageOverrides = self: super: {
botocore = super.botocore.overridePythonAttrs (oldAttrs: rec {
version = "2.0.0dev25";
src = fetchFromGitHub {
owner = "boto";
repo = "botocore";
rev = "bf9a885fa0bc0bba0c3c806eeeb60d9ad5f3e069";
sha256 = "1llshaxpnz9a7mw4kkz9msdgkzz3in5ws3rvd7l077ghj9jkfz9a";
};
});
prompt_toolkit = super.prompt_toolkit.overridePythonAttrs (oldAttrs: rec {
version = "2.0.10";
src = oldAttrs.src.override {
inherit version;
sha256 = "1nr990i4b04rnlw1ghd0xmgvvvhih698mb6lb6jylr76cs7zcnpi";
};
});
};
};
pythonPackages = python3.pkgs;
awscli2 = with self; pythonPackages.buildPythonApplication rec {
pname = "awscli";
version = "2.0.21"; # N.B: if you change this, change botocore to a matching version too
src = fetchFromGitHub {
owner = "aws";
repo = "aws-cli";
rev = version;
sha256 = "1lxkdjsl3w9c621byy3gggadhfrw8xcw37x3xci9qszxqc10b467";
};
postPatch = ''
substituteInPlace setup.py --replace ",<0.16" ""
substituteInPlace setup.py --replace "cryptography>=2.8.0,<=2.9.0" "cryptography>=2.8.0,<2.10"
'';
# No tests included
doCheck = false;
propagatedBuildInputs = with pythonPackages; [
bcdoc
botocore
colorama
cryptography
docutils
groff
less
prompt_toolkit
pyyaml
rsa
ruamel_yaml
s3transfer
six
];
postInstall = ''
mkdir -p $out/etc/bash_completion.d
echo "complete -C $out/bin/aws_completer aws" > $out/etc/bash_completion.d/awscli
mkdir -p $out/share/zsh/site-functions
mv $out/bin/aws_zsh_completer.sh $out/share/zsh/site-functions
rm $out/bin/aws.cmd
'';
passthru.python3 = python3; # for aws_shell
meta = with super.lib; {
homepage = "https://aws.amazon.com/cli/";
description = "Unified tool to manage your AWS services";
license = licenses.asl20;
maintainers = [ ];
};
};
}