2022-05-18 14:49:53 +00:00
|
|
|
{ lib, fetchFromGitHub, python3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-05-18 14:49:53 +00:00
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
click = super.click.overridePythonAttrs (old: rec {
|
|
|
|
version = "7.1.2";
|
|
|
|
src = old.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
requests-aws4auth = super.requests-aws4auth.overridePythonAttrs (old: {
|
|
|
|
doCheck = false; # requires click>=8.0
|
|
|
|
});
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-05-18 14:49:53 +00:00
|
|
|
in python.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "elasticsearch-curator";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "5.8.4";
|
|
|
|
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elastic";
|
|
|
|
repo = "curator";
|
|
|
|
rev = "v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
hash = "sha256-wSfd52jebUkgF5xhjcoUjI7j46eJF33pVb4Wrybq44g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "urllib3==1.26.4" "urllib3"
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "urllib3==1.26.4" "urllib3" \
|
|
|
|
--replace "pyyaml==5.4.1" "pyyaml"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
elasticsearch
|
2022-05-18 14:49:53 +00:00
|
|
|
urllib3
|
|
|
|
requests
|
2020-04-24 23:36:52 +00:00
|
|
|
boto3
|
2022-05-18 14:49:53 +00:00
|
|
|
requests-aws4auth
|
|
|
|
click
|
|
|
|
pyyaml
|
|
|
|
voluptuous
|
|
|
|
certifi
|
|
|
|
six
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python.pkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
mock
|
2022-05-18 14:49:53 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"test/integration" # requires running elasticsearch
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# access network
|
|
|
|
"test_api_key_not_set"
|
|
|
|
"test_api_key_set"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/elastic/curator";
|
|
|
|
description = "Curate, or manage, your Elasticsearch indices and snapshots";
|
|
|
|
license = licenses.asl20;
|
|
|
|
longDescription = ''
|
|
|
|
Elasticsearch Curator helps you curate, or manage, your Elasticsearch
|
|
|
|
indices and snapshots by:
|
|
|
|
|
|
|
|
* Obtaining the full list of indices (or snapshots) from the cluster, as the
|
|
|
|
actionable list
|
|
|
|
|
|
|
|
* Iterate through a list of user-defined filters to progressively remove
|
|
|
|
indices (or snapshots) from this actionable list as needed.
|
|
|
|
|
|
|
|
* Perform various actions on the items which remain in the actionable list.
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ basvandijk ];
|
|
|
|
};
|
|
|
|
}
|