nixpkgs-suyu/pkgs/tools/admin/oci-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

88 lines
1.9 KiB
Nix
Raw Normal View History

2022-01-10 10:29:45 +01:00
{ lib
, fetchFromGitHub
, python3
}:
2021-04-14 13:33:26 +02:00
let
2022-01-10 10:29:45 +01:00
py = python3.override {
packageOverrides = self: super: {
click = super.click.overridePythonAttrs (oldAttrs: rec {
version = "7.1.2";
2021-04-14 13:33:26 +02:00
2022-01-10 10:29:45 +01:00
src = oldAttrs.src.override {
inherit version;
hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
sha256 = "";
2022-01-10 10:29:45 +01:00
};
});
2021-04-14 13:33:26 +02:00
jmespath = super.jmespath.overridePythonAttrs (oldAttrs: rec {
version = "0.10.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9";
hash = "";
};
2022-08-13 22:08:43 +02:00
doCheck = false;
});
2022-01-10 10:29:45 +01:00
};
};
2021-04-14 13:33:26 +02:00
in
2022-01-10 10:29:45 +01:00
with py.pkgs;
2021-04-14 13:33:26 +02:00
2022-01-10 10:29:45 +01:00
buildPythonApplication rec {
2021-04-14 13:33:26 +02:00
pname = "oci-cli";
2022-08-13 22:08:43 +02:00
version = "3.14.0";
2022-01-10 10:29:45 +01:00
format = "setuptools";
2021-04-14 13:33:26 +02:00
src = fetchFromGitHub {
owner = "oracle";
2022-08-13 22:08:43 +02:00
repo = pname;
2021-04-14 13:33:26 +02:00
rev = "v${version}";
2022-08-13 22:08:43 +02:00
hash = "sha256-yooEZuSIw2EMJVyT/Z/x4hJi8a1F674CtsMMGkMAYLg=";
2021-04-14 13:33:26 +02:00
};
2022-01-10 10:29:45 +01:00
propagatedBuildInputs = [
arrow
certifi
click
cryptography
jmespath
oci
2022-08-13 22:08:43 +02:00
prompt-toolkit
2022-01-10 10:29:45 +01:00
pyopenssl
python-dateutil
pytz
pyyaml
retrying
six
terminaltables
2021-04-14 13:33:26 +02:00
];
postPatch = ''
substituteInPlace setup.py \
2022-08-13 22:08:43 +02:00
--replace "cryptography>=3.2.1,<=37.0.2" "cryptography" \
--replace "pyOpenSSL>=17.5.0,<=22.0.0" "pyOpenSSL" \
2022-01-10 10:29:45 +01:00
--replace "PyYAML>=5.4,<6" "PyYAML" \
2022-08-13 22:08:43 +02:00
--replace "prompt-toolkit==3.0.29" "prompt-toolkit" \
2022-09-14 16:08:08 +02:00
--replace "terminaltables==3.1.0" "terminaltables" \
--replace "oci==2.78.0" "oci"
2021-04-14 13:33:26 +02:00
'';
2022-01-10 10:29:45 +01:00
# https://github.com/oracle/oci-cli/issues/187
doCheck = false;
pythonImportsCheck = [
" oci_cli "
];
2021-04-14 13:33:26 +02:00
meta = with lib; {
description = "Command Line Interface for Oracle Cloud Infrastructure";
homepage = "https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm";
2022-01-10 10:29:45 +01:00
license = with licenses; [ asl20 /* or */ upl ];
2021-04-14 13:33:26 +02:00
maintainers = with maintainers; [ ilian ];
};
}