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

75 lines
1.5 KiB
Nix
Raw Normal View History

2022-01-10 09:29:45 +00:00
{ lib
, fetchFromGitHub
, python3
}:
2021-04-14 11:33:26 +00:00
let
2022-01-10 09:29:45 +00:00
py = python3.override {
packageOverrides = self: super: {
click = super.click.overridePythonAttrs (oldAttrs: rec {
version = "7.1.2";
2021-04-14 11:33:26 +00:00
2022-01-10 09:29:45 +00:00
src = oldAttrs.src.override {
inherit version;
hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
};
});
2021-04-14 11:33:26 +00:00
2022-01-10 09:29:45 +00:00
};
};
2021-04-14 11:33:26 +00:00
in
2022-01-10 09:29:45 +00:00
with py.pkgs;
2021-04-14 11:33:26 +00:00
2022-01-10 09:29:45 +00:00
buildPythonApplication rec {
2021-04-14 11:33:26 +00:00
pname = "oci-cli";
2022-02-11 18:19:32 +00:00
version = "3.5.0";
2022-01-10 09:29:45 +00:00
format = "setuptools";
2021-04-14 11:33:26 +00:00
src = fetchFromGitHub {
owner = "oracle";
repo = "oci-cli";
rev = "v${version}";
2022-02-11 18:19:32 +00:00
hash = "sha256-udvYfYFUulGfnc1gzjG3UxOc68JuecpPJ1/s57qvX0k=";
2021-04-14 11:33:26 +00:00
};
2022-01-10 09:29:45 +00:00
propagatedBuildInputs = [
arrow
certifi
click
configparser
cryptography
jmespath
oci
pyopenssl
python-dateutil
pytz
pyyaml
retrying
six
terminaltables
2021-04-14 11:33:26 +00:00
];
postPatch = ''
substituteInPlace setup.py \
2022-01-10 09:29:45 +00:00
--replace "cryptography>=3.2.1,<=3.4.7" "cryptography" \
2021-04-14 11:33:26 +00:00
--replace "pyOpenSSL==19.1.0" "pyOpenSSL" \
2022-01-10 09:29:45 +00:00
--replace "PyYAML>=5.4,<6" "PyYAML" \
--replace "terminaltables==3.1.0" "terminaltables"
2021-04-14 11:33:26 +00:00
'';
2022-01-10 09:29:45 +00:00
# https://github.com/oracle/oci-cli/issues/187
doCheck = false;
pythonImportsCheck = [
" oci_cli "
];
2021-04-14 11:33:26 +00: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 09:29:45 +00:00
license = with licenses; [ asl20 /* or */ upl ];
2021-04-14 11:33:26 +00:00
maintainers = with maintainers; [ ilian ];
};
}