Skip to content

Commit

Permalink
Merge pull request #58139 from srhb/backport-click-curator-fix
Browse files Browse the repository at this point in the history
Backport: elasticsearch-curator: add top-level package using older click
  • Loading branch information
dotlambda authored Mar 26, 2019
2 parents 87221ac + a1d14f3 commit f02e43e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 28 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/services/search/elasticsearch-curator.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ in {
startAt = cfg.interval;
serviceConfig = {
ExecStart =
"${pkgs.python3Packages.elasticsearch-curator}/bin/curator" +
"${pkgs.elasticsearch-curator}/bin/curator" +
" --config ${curatorConfig} ${curatorAction}";
};
};
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/arduino/platformio/chrootenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let
inherit version;
sha256 = "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a";
};
patches = [];
postPatch = "";
});

platformio = self.callPackage ./core.nix { };
Expand Down
12 changes: 6 additions & 6 deletions pkgs/development/python-modules/click/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }:
{ lib, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }:

buildPythonPackage rec {
pname = "click";
Expand All @@ -10,10 +10,10 @@ buildPythonPackage rec {
sha256 = "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7";
};

patches = stdenv.lib.optional (stdenv.lib.versionAtLeast version "6.7") (substituteAll {
src = ./fix-paths.patch;
locale = "${locale}/bin/locale";
});
postPatch = ''
substituteInPlace click/_unicodefun.py \
--replace "'locale'" "'${locale}/bin/locale'"
'';

buildInputs = [ pytest ];

Expand All @@ -24,7 +24,7 @@ buildPythonPackage rec {
# https://github.com/pallets/click/issues/823
doCheck = false;

meta = with stdenv.lib; {
meta = with lib; {
homepage = http://click.pocoo.org/;
description = "Create beautiful command line interfaces in Python";
longDescription = ''
Expand Down
13 changes: 0 additions & 13 deletions pkgs/development/python-modules/click/fix-paths.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
};
}
12 changes: 12 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2506,6 +2506,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 { };
Expand Down

0 comments on commit f02e43e

Please sign in to comment.