1{ lib, python3, fetchPypi, glibcLocales, docker-compose_1 }:
2let
3 docker_compose = changeVersion (with localPython.pkgs; docker-compose_1.override {
4 inherit colorama pyyaml six dockerpty docker jsonschema requests websocket-client paramiko;
5 }).overridePythonAttrs "1.25.5" "sha256-ei622Bc/30COUF5vfUl6wLd3OIcZVCvp5JoO/Ud6UMY=";
6
7 changeVersion = overrideFunc: version: hash: overrideFunc (oldAttrs: rec {
8 inherit version;
9 src = oldAttrs.src.override {
10 inherit version hash;
11 };
12 });
13
14 localPython = python3.override
15 {
16 self = localPython;
17 packageOverrides = self: super: {
18 cement = changeVersion super.cement.overridePythonAttrs "2.8.2" "sha256-h2XtBSwGHXTk0Bia3cM9Jo3lRMohmyWdeXdB9yXkItI=";
19 wcwidth = changeVersion super.wcwidth.overridePythonAttrs "0.1.9" "sha256-7nOGKGKhVr93/5KwkDT8SCXdOvnPgbxbNgZo1CXzxfE=";
20 semantic-version = changeVersion super.semantic-version.overridePythonAttrs "2.8.5" "sha256-0sst4FWHYpNGebmhBOguynr0SMn0l00fPuzP9lHfilQ=";
21 pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec {
22 version = "5.4.1";
23 checkPhase = ''
24 runHook preCheck
25 PYTHONPATH="tests/lib3:$PYTHONPATH" ${localPython.interpreter} -m test_all
26 runHook postCheck
27 '';
28 src = fetchPypi {
29 pname = "PyYAML";
30 inherit version;
31 hash = "sha256-YHd0y7oocyv6gCtUuqdIQhX1MJkQVbtWLvvtWy8gpF4=";
32 };
33 });
34 };
35 };
36in
37with localPython.pkgs; buildPythonApplication rec {
38 pname = "awsebcli";
39 version = "3.20.6";
40
41 src = fetchPypi {
42 inherit pname version;
43 hash = "sha256-9n6nObYoZlOKgQvSdNqHLRr+RlDoKfR3fgD7Xa9wPzM=";
44 };
45
46
47 preConfigure = ''
48 substituteInPlace requirements.txt \
49 --replace "six>=1.11.0,<1.15.0" "six==1.16.0" \
50 --replace "requests>=2.20.1,<=2.26" "requests<3" \
51 --replace "pathspec==0.10.1" "pathspec>=0.10.0,<1" \
52 --replace "colorama>=0.2.5,<0.4.4" "colorama>=0.2.5,<=0.4.6" \
53 --replace "termcolor == 1.1.0" "termcolor>=2.0.0,<3"
54 '';
55
56 buildInputs = [
57 glibcLocales
58 ];
59
60 nativeCheckInputs = [
61 pytest
62 mock
63 nose
64 pathspec
65 colorama
66 requests
67 docutils
68 ];
69
70 doCheck = true;
71
72 propagatedBuildInputs = [
73 blessed
74 botocore
75 cement
76 colorama
77 pathspec
78 pyyaml
79 future
80 requests
81 semantic-version
82 setuptools
83 tabulate
84 termcolor
85 websocket-client
86 docker_compose
87 ];
88
89 meta = with lib; {
90 homepage = "https://aws.amazon.com/elasticbeanstalk/";
91 description = "A command line interface for Elastic Beanstalk";
92 changelog = "https://github.com/aws/aws-elastic-beanstalk-cli/blob/${version}/CHANGES.rst";
93 maintainers = with maintainers; [ eqyiel kirillrdy ];
94 license = licenses.asl20;
95 };
96}