summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2019-03-21 11:44:08 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2019-03-21 11:53:32 +0100
commitc0409de98d0736eaf5c45e8444265a51b5e6c9f9 (patch)
treedc0317d3f881040c460044e3b2dd45a385f51c96
parent0b87a56015003fe7f19580cd596d1c3fcc2db473 (diff)
downloadnixpkgs-c0409de98d0736eaf5c45e8444265a51b5e6c9f9.tar
nixpkgs-c0409de98d0736eaf5c45e8444265a51b5e6c9f9.tar.gz
nixpkgs-c0409de98d0736eaf5c45e8444265a51b5e6c9f9.tar.bz2
nixpkgs-c0409de98d0736eaf5c45e8444265a51b5e6c9f9.tar.lz
nixpkgs-c0409de98d0736eaf5c45e8444265a51b5e6c9f9.tar.xz
nixpkgs-c0409de98d0736eaf5c45e8444265a51b5e6c9f9.tar.zst
nixpkgs-c0409de98d0736eaf5c45e8444265a51b5e6c9f9.zip
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.
-rw-r--r--nixos/modules/services/search/elasticsearch-curator.nix2
-rw-r--r--pkgs/development/python-modules/elasticsearch-curator/default.nix10
-rw-r--r--pkgs/top-level/all-packages.nix12
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 8cb1275284a..9620c3e0b6d 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 42fb8dee488..b65e524346f 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 81a1b4b0f68..4ae8b09cdc2 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 { };