python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / admin / oci-cli / default.nix
blob2772bc49a457e918ca8cd9613e1cd6300062411c
1 { lib
2 , fetchFromGitHub
3 , python3
4 }:
6 let
7   py = python3.override {
8     packageOverrides = self: super: {
10       click = super.click.overridePythonAttrs (oldAttrs: rec {
11         version = "7.1.2";
13         src = oldAttrs.src.override {
14           inherit version;
15           hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
16           sha256 = "";
17         };
18       });
20       jmespath = super.jmespath.overridePythonAttrs (oldAttrs: rec {
21         version = "0.10.0";
22         src = oldAttrs.src.override {
23           inherit version;
24           sha256 = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9";
25           hash = "";
26         };
27         doCheck = false;
28       });
30     };
31   };
33 with py.pkgs;
35 buildPythonApplication rec {
36   pname = "oci-cli";
37   version = "3.14.0";
38   format = "setuptools";
40   src = fetchFromGitHub {
41     owner = "oracle";
42     repo = pname;
43     rev = "v${version}";
44     hash = "sha256-yooEZuSIw2EMJVyT/Z/x4hJi8a1F674CtsMMGkMAYLg=";
45   };
47   propagatedBuildInputs = [
48     arrow
49     certifi
50     click
51     cryptography
52     jmespath
53     oci
54     prompt-toolkit
55     pyopenssl
56     python-dateutil
57     pytz
58     pyyaml
59     retrying
60     six
61     terminaltables
62   ];
64   postPatch = ''
65     substituteInPlace setup.py \
66       --replace "cryptography>=3.2.1,<=37.0.2" "cryptography" \
67       --replace "pyOpenSSL>=17.5.0,<=22.0.0" "pyOpenSSL" \
68       --replace "PyYAML>=5.4,<6" "PyYAML" \
69       --replace "prompt-toolkit==3.0.29" "prompt-toolkit" \
70       --replace "terminaltables==3.1.0" "terminaltables" \
71       --replace "oci==2.78.0" "oci"
72   '';
74   # https://github.com/oracle/oci-cli/issues/187
75   doCheck = false;
77   pythonImportsCheck = [
78     " oci_cli "
79   ];
81   meta = with lib; {
82     description = "Command Line Interface for Oracle Cloud Infrastructure";
83     homepage = "https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm";
84     license = with licenses; [ asl20 /* or */ upl ];
85     maintainers = with maintainers; [ ilian ];
86   };