Merge pull request #119412 from ilian/oci-cli
This commit is contained in:
commit
4a4ede4f00
|
@ -0,0 +1,45 @@
|
||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, buildPythonPackage
|
||||||
|
, certifi
|
||||||
|
, configparser
|
||||||
|
, cryptography
|
||||||
|
, pyopenssl
|
||||||
|
, dateutil
|
||||||
|
, pytz
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "oci";
|
||||||
|
version = "2.36.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "oracle";
|
||||||
|
repo = "oci-python-sdk";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-scG/ZhWeiCgXp7iD6arWIN8KZecSjKLsCW4oXeJvx6M=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "configparser==4.0.2" "configparser" \
|
||||||
|
--replace "cryptography==3.2.1" "cryptography" \
|
||||||
|
--replace "pyOpenSSL>=17.5.0,<=19.1.0" "pyOpenSSL"
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
certifi configparser cryptography pyopenssl dateutil pytz
|
||||||
|
];
|
||||||
|
|
||||||
|
# Tests fail: https://github.com/oracle/oci-python-sdk/issues/164
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "oci" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Oracle Cloud Infrastructure Python SDK";
|
||||||
|
homepage = "https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/index.html";
|
||||||
|
maintainers = with maintainers; [ ilian ];
|
||||||
|
license = with licenses; [ asl20 upl ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
{ lib, fetchFromGitHub, python3Packages, locale }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# https://github.com/oracle/oci-cli/issues/189
|
||||||
|
pinned_click = python3Packages.click.overridePythonAttrs (old: rec {
|
||||||
|
pname = "click";
|
||||||
|
version = "6.7";
|
||||||
|
src = python3Packages.fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
hash = "sha256-8VUW30eNWlYYD7+A5o8gYBDm0WD8OfpQi2XgNf11Ews=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace click/_unicodefun.py \
|
||||||
|
--replace "'locale'" "'${locale}/bin/locale'"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Issue that wasn't resolved when this version was released:
|
||||||
|
# https://github.com/pallets/click/issues/823
|
||||||
|
doCheck = false;
|
||||||
|
});
|
||||||
|
in
|
||||||
|
|
||||||
|
python3Packages.buildPythonApplication rec {
|
||||||
|
pname = "oci-cli";
|
||||||
|
version = "2.23.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "oracle";
|
||||||
|
repo = "oci-cli";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-XRkycJrUSOZQAGiSyQZGA/SnlxnFumYL82kOkYd7s2o=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
oci arrow certifi pinned_click configparser cryptography jmespath dateutil
|
||||||
|
pytz retrying six terminaltables pyopenssl pyyaml
|
||||||
|
];
|
||||||
|
|
||||||
|
# https://github.com/oracle/oci-cli/issues/187
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "configparser==4.0.2" "configparser" \
|
||||||
|
--replace "cryptography==3.2.1" "cryptography" \
|
||||||
|
--replace "pyOpenSSL==19.1.0" "pyOpenSSL" \
|
||||||
|
--replace "PyYAML==5.3.1" "PyYAML" \
|
||||||
|
--replace "six==1.14.0" "six"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Command Line Interface for Oracle Cloud Infrastructure";
|
||||||
|
homepage = "https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm";
|
||||||
|
maintainers = with maintainers; [ ilian ];
|
||||||
|
license = with licenses; [ asl20 upl ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2841,6 +2841,8 @@ in
|
||||||
|
|
||||||
nyx = callPackage ../tools/networking/nyx { };
|
nyx = callPackage ../tools/networking/nyx { };
|
||||||
|
|
||||||
|
oci-cli = callPackage ../tools/admin/oci-cli { };
|
||||||
|
|
||||||
ocrmypdf = callPackage ../tools/text/ocrmypdf { };
|
ocrmypdf = callPackage ../tools/text/ocrmypdf { };
|
||||||
|
|
||||||
ocrfeeder = callPackage ../applications/graphics/ocrfeeder { };
|
ocrfeeder = callPackage ../applications/graphics/ocrfeeder { };
|
||||||
|
|
|
@ -4815,6 +4815,8 @@ in {
|
||||||
graphvizPkgs = pkgs.graphviz;
|
graphvizPkgs = pkgs.graphviz;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
oci = callPackage ../development/python-modules/oci { };
|
||||||
|
|
||||||
od = callPackage ../development/python-modules/od { };
|
od = callPackage ../development/python-modules/od { };
|
||||||
|
|
||||||
odfpy = callPackage ../development/python-modules/odfpy { };
|
odfpy = callPackage ../development/python-modules/odfpy { };
|
||||||
|
|
Loading…
Reference in New Issue