From c0409de98d0736eaf5c45e8444265a51b5e6c9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 21 Mar 2019 11:44:08 +0100 Subject: [PATCH] elasticsearch-curator: add top-level package using older click See https://github.com/NixOS/nixpkgs/pull/58023 for a discussion of why this is necessary. The upstream issue can be found at https://github.com/elastic/curator/pull/1280. --- .../services/search/elasticsearch-curator.nix | 2 +- .../python-modules/elasticsearch-curator/default.nix | 10 +++------- pkgs/top-level/all-packages.nix | 12 ++++++++++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/search/elasticsearch-curator.nix b/nixos/modules/services/search/elasticsearch-curator.nix index 8cb1275284a3..9620c3e0b6d4 100644 --- a/nixos/modules/services/search/elasticsearch-curator.nix +++ b/nixos/modules/services/search/elasticsearch-curator.nix @@ -86,7 +86,7 @@ in { startAt = cfg.interval; serviceConfig = { ExecStart = - "${pkgs.python3Packages.elasticsearch-curator}/bin/curator" + + "${pkgs.elasticsearch-curator}/bin/curator" + " --config ${curatorConfig} ${curatorAction}"; }; }; diff --git a/pkgs/development/python-modules/elasticsearch-curator/default.nix b/pkgs/development/python-modules/elasticsearch-curator/default.nix index 42fb8dee4886..b65e524346f0 100644 --- a/pkgs/development/python-modules/elasticsearch-curator/default.nix +++ b/pkgs/development/python-modules/elasticsearch-curator/default.nix @@ -45,13 +45,6 @@ buildPythonPackage rec { funcsigs ]; - postPatch = '' - substituteInPlace setup.cfg \ - --replace 'click>=6.7,<7.0' 'click' - substituteInPlace setup.py \ - --replace 'click>=6.7,<7.0' 'click' - ''; - meta = with stdenv.lib; { homepage = https://github.com/elastic/curator; description = "Curate, or manage, your Elasticsearch indices and snapshots"; @@ -69,5 +62,8 @@ buildPythonPackage rec { * Perform various actions on the items which remain in the actionable list. ''; maintainers = with maintainers; [ basvandijk ]; + + # https://github.com/elastic/curator/pull/1280 + broken = versionAtLeast click.version "7.0"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81a1b4b0f68a..4ae8b09cdc25 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2534,6 +2534,18 @@ in callPackage ../servers/search/elasticsearch/plugins.nix { } ); + elasticsearch-curator = with (python3.override { + packageOverrides = self: super: { + click = super.click.overridePythonAttrs (oldAttrs: rec { + version = "6.7"; + src = oldAttrs.src.override { + inherit version; + sha256 = "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b"; + }; + }); + }; + }).pkgs; toPythonApplication elasticsearch-curator; + embree2 = callPackage ../development/libraries/embree/2.x.nix { }; emem = callPackage ../applications/misc/emem { };