pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / by-name / aw / awsebcli / package.nix
blob21a20ad7dd168fdff81a8ab2d4d1a801b6dd993b
2   lib,
3   python3,
4   fetchFromGitHub,
5   git,
6 }:
8 let
9   changeVersion =
10     overrideFunc: version: hash:
11     overrideFunc (oldAttrs: rec {
12       inherit version;
13       src = oldAttrs.src.override {
14         inherit version hash;
15       };
16     });
18   localPython = python3.override {
19     self = localPython;
20     packageOverrides = self: super: {
21       cement =
22         changeVersion super.cement.overridePythonAttrs "2.10.14"
23           "sha256-NC4n21SmYW3RiS7QuzWXoifO4z3C2FVgQm3xf8qQcFg=";
24     };
25   };
29 localPython.pkgs.buildPythonApplication rec {
30   pname = "awsebcli";
31   version = "3.21";
32   format = "setuptools";
34   src = fetchFromGitHub {
35     owner = "aws";
36     repo = "aws-elastic-beanstalk-cli";
37     rev = "refs/tags/${version}";
38     hash = "sha256-VU8bXvS4m4eIamjlgGmHE2qwDXWAXvWTa0QHomXR5ZE=";
39   };
41   postPatch = ''
42     # https://github.com/aws/aws-elastic-beanstalk-cli/pull/469
43     substituteInPlace setup.py --replace-fail "scripts=['bin/eb']," ""
44   '';
46   propagatedBuildInputs = with localPython.pkgs; [
47     blessed
48     botocore
49     cement
50     colorama
51     pathspec
52     pyyaml
53     future
54     requests
55     semantic-version
56     setuptools
57     tabulate
58     termcolor
59     websocket-client
60   ];
62   pythonRelaxDeps = [
63     "botocore"
64     "colorama"
65     "pathspec"
66     "PyYAML"
67     "six"
68     "termcolor"
69   ];
71   nativeCheckInputs = with localPython.pkgs; [
72     pytestCheckHook
73     pytest-socket
74     mock
75     git
76   ];
78   pytestFlagsArray = [
79     "tests/unit"
80   ];
82   disabledTests = [
83     # Needs docker installed to run.
84     "test_local_run"
85     "test_local_run__with_arguments"
87     # Needs access to the user's ~/.ssh directory.
88     "test_generate_and_upload_keypair__exit_code_0"
89     "test_generate_and_upload_keypair__exit_code_1"
90     "test_generate_and_upload_keypair__exit_code_is_other_than_1_and_0"
91     "test_generate_and_upload_keypair__ssh_keygen_not_present"
92   ];
94   meta = with lib; {
95     homepage = "https://aws.amazon.com/elasticbeanstalk/";
96     description = "Command line interface for Elastic Beanstalk";
97     changelog = "https://github.com/aws/aws-elastic-beanstalk-cli/blob/${version}/CHANGES.rst";
98     maintainers = with maintainers; [ kirillrdy ];
99     license = licenses.asl20;
100     mainProgram = "eb";
101   };