diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/admin/elasticsearch-curator/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/admin/elasticsearch-curator/default.nix | 95 |
1 files changed, 54 insertions, 41 deletions
diff --git a/nixpkgs/pkgs/tools/admin/elasticsearch-curator/default.nix b/nixpkgs/pkgs/tools/admin/elasticsearch-curator/default.nix index 576df67ad5fd..77acc590e1d4 100644 --- a/nixpkgs/pkgs/tools/admin/elasticsearch-curator/default.nix +++ b/nixpkgs/pkgs/tools/admin/elasticsearch-curator/default.nix @@ -1,65 +1,77 @@ -{ lib, fetchFromGitHub, python3 }: +{ lib +, fetchFromGitHub +, python3 +}: -let - 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 - }); - }; - }; -in python.pkgs.buildPythonApplication rec { - pname = "elasticsearch-curator"; - version = "5.8.4"; - - format = "setuptools"; +python3.pkgs.buildPythonApplication rec { + pname = "elasticsearch-curator"; + version = "8.0.4"; + format = "pyproject"; src = fetchFromGitHub { owner = "elastic"; repo = "curator"; - rev = "v${version}"; - hash = "sha256-wSfd52jebUkgF5xhjcoUjI7j46eJF33pVb4Wrybq44g="; + rev = "refs/tags/v${version}"; + hash = "sha256-FPp2BpfYsmNwwevYQ6EH3N1q0TjyeEsBeDM9EUbLl+Q="; }; - 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" - ''; + pythonRelaxDeps = [ + "click" + "ecs-logging" + "elasticsearch8" + "es_client" + "pyyaml" + ]; + + nativeBuildInputs = with python3.pkgs; [ + hatchling + pythonRelaxDepsHook + ]; - propagatedBuildInputs = with python.pkgs; [ - elasticsearch - urllib3 - requests - boto3 - requests-aws4auth + propagatedBuildInputs = with python3.pkgs; [ + certifi click + ecs-logging + elasticsearch8 + es-client pyyaml - voluptuous - certifi six + voluptuous ]; - checkInputs = with python.pkgs; [ + nativeCheckInputs = with python3.pkgs; [ mock + requests pytestCheckHook ]; disabledTestPaths = [ - "test/integration" # requires running elasticsearch + # Test requires running elasticsearch + "tests/integration/test_alias.py" + "tests/integration/test_allocation.py" + "tests/integration/test_cli.py" + "tests/integration/test_close.py" + "tests/integration/test_clusterrouting.py" + "tests/integration/test_count_pattern.py" + "tests/integration/test_create_index.py" + "tests/integration/test_datemath.py" + "tests/integration/test_delete_indices.py" + "tests/integration/test_delete_snapshots.py" + "tests/integration/test_delete_snapshots.py" + "tests/integration/test_es_repo_mgr.py" + "tests/integration/test_forcemerge.py" + "tests/integration/test_integrations.py" + "tests/integration/test_open.py" + "tests/integration/test_reindex.py" + "tests/integration/test_replicas.py" + "tests/integration/test_restore.py" + "tests/integration/test_rollover.py" + "tests/integration/test_shrink.py" + "tests/integration/test_snapshot.py" ]; disabledTests = [ - # access network + # Test require access network "test_api_key_not_set" "test_api_key_set" ]; @@ -80,6 +92,7 @@ in python.pkgs.buildPythonApplication rec { * Perform various actions on the items which remain in the actionable list. ''; + changelog = "https://github.com/elastic/curator/releases/tag/v${version}"; maintainers = with maintainers; [ basvandijk ]; }; } |