diff options
author | ilian <ilian@tuta.io> | 2021-04-14 13:33:26 +0200 |
---|---|---|
committer | ilian <ilian@tuta.io> | 2021-04-14 19:33:30 +0200 |
commit | a5a359aade832b367c78e866d130408b07ab06a2 (patch) | |
tree | 4bbdb93e98a674dfcb14bc216dfd50058c7df1d9 /pkgs/tools/admin/oci-cli | |
parent | 59c461352e58c76ae417cda68f02253fa03bfabf (diff) | |
download | nixpkgs-a5a359aade832b367c78e866d130408b07ab06a2.tar nixpkgs-a5a359aade832b367c78e866d130408b07ab06a2.tar.gz nixpkgs-a5a359aade832b367c78e866d130408b07ab06a2.tar.bz2 nixpkgs-a5a359aade832b367c78e866d130408b07ab06a2.tar.lz nixpkgs-a5a359aade832b367c78e866d130408b07ab06a2.tar.xz nixpkgs-a5a359aade832b367c78e866d130408b07ab06a2.tar.zst nixpkgs-a5a359aade832b367c78e866d130408b07ab06a2.zip |
oci-cli: init at 2.23.0
Diffstat (limited to 'pkgs/tools/admin/oci-cli')
-rw-r--r-- | pkgs/tools/admin/oci-cli/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/tools/admin/oci-cli/default.nix b/pkgs/tools/admin/oci-cli/default.nix new file mode 100644 index 00000000000..16ecff07b73 --- /dev/null +++ b/pkgs/tools/admin/oci-cli/default.nix @@ -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 ]; + }; +} |