nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, certifi
4, circuitbreaker
5, configparser
6, cryptography
7, fetchFromGitHub
8, pyopenssl
9, python-dateutil
10, pythonOlder
11, pytz
12}:
13
14buildPythonPackage rec {
15 pname = "oci";
16 version = "2.63.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchFromGitHub {
22 owner = "oracle";
23 repo = "oci-python-sdk";
24 rev = "v${version}";
25 hash = "sha256-EIn7BRXsVf7R2ij8iK3hrNWnLehxKDBlk96lAhFh0xw=";
26 };
27
28 propagatedBuildInputs = [
29 certifi
30 circuitbreaker
31 configparser
32 cryptography
33 pyopenssl
34 python-dateutil
35 pytz
36 ];
37
38 postPatch = ''
39 substituteInPlace setup.py \
40 --replace "configparser==4.0.2 ; python_version < '3'" "configparser" \
41 --replace "cryptography>=3.2.1,<=3.4.7" "cryptography" \
42 --replace "pyOpenSSL>=17.5.0,<=19.1.0" "pyOpenSSL"
43 '';
44
45 # Tests fail: https://github.com/oracle/oci-python-sdk/issues/164
46 doCheck = false;
47
48 pythonImportsCheck = [
49 "oci"
50 ];
51
52 meta = with lib; {
53 description = "Oracle Cloud Infrastructure Python SDK";
54 homepage = "https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/";
55 license = with licenses; [ asl20 /* or */ upl ];
56 maintainers = with maintainers; [ ilian ];
57 };
58}