elasticsearch-curator: move out of python-packages
Upstream froze click to <7, which means it will only work with overrides, which means it can't compose with other python modules.
This commit is contained in:
parent
19b5055f6a
commit
6a983b61d4
@ -1,27 +1,29 @@
|
|||||||
{ stdenv
|
{ lib, fetchFromGitHub, python }:
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, boto3
|
|
||||||
, click
|
|
||||||
, certifi
|
|
||||||
, requests-aws4auth
|
|
||||||
, voluptuous
|
|
||||||
, pyyaml
|
|
||||||
, elasticsearch
|
|
||||||
, nosexcover
|
|
||||||
, coverage
|
|
||||||
, nose
|
|
||||||
, mock
|
|
||||||
, funcsigs
|
|
||||||
} :
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
let
|
||||||
|
py = python.override {
|
||||||
|
packageOverrides = self: super: {
|
||||||
|
click = super.click.overridePythonAttrs (oldAttrs: rec {
|
||||||
|
version = "6.7";
|
||||||
|
src = oldAttrs.src.override {
|
||||||
|
inherit version;
|
||||||
|
sha256 = "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
with py.pkgs;
|
||||||
|
buildPythonApplication rec {
|
||||||
pname = "elasticsearch-curator";
|
pname = "elasticsearch-curator";
|
||||||
version = "5.8.1";
|
version = "5.8.1";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "elastic";
|
||||||
sha256 = "f0eec9ad043a30bc2e2232637111960139a1bda38232241bdd2f0c253a3584df";
|
repo = "curator";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1shr9jslirjnbvma3p19djsnamxl7f3m9c8zrlclk57zv8rnwpkr";
|
||||||
};
|
};
|
||||||
|
|
||||||
# The test hangs so we disable it.
|
# The test hangs so we disable it.
|
||||||
@ -31,6 +33,7 @@ buildPythonPackage rec {
|
|||||||
click
|
click
|
||||||
certifi
|
certifi
|
||||||
requests-aws4auth
|
requests-aws4auth
|
||||||
|
pyopenssl
|
||||||
voluptuous
|
voluptuous
|
||||||
pyyaml
|
pyyaml
|
||||||
elasticsearch
|
elasticsearch
|
||||||
@ -46,10 +49,15 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i s/pyyaml==3.12/pyyaml==${pyyaml.version}/ setup.cfg setup.py
|
sed -i s/pyyaml==3.13/pyyaml/g setup.cfg setup.py
|
||||||
|
sed -i s/pyyaml==3.12/pyyaml/g setup.cfg setup.py
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "urllib3>=1.24.2,<1.25" "urllib3"
|
||||||
|
substituteInPlace setup.cfg \
|
||||||
|
--replace "urllib3>=1.24.2,<1.25" "urllib3"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://github.com/elastic/curator;
|
homepage = https://github.com/elastic/curator;
|
||||||
description = "Curate, or manage, your Elasticsearch indices and snapshots";
|
description = "Curate, or manage, your Elasticsearch indices and snapshots";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
@ -68,6 +76,6 @@ buildPythonPackage rec {
|
|||||||
maintainers = with maintainers; [ basvandijk ];
|
maintainers = with maintainers; [ basvandijk ];
|
||||||
|
|
||||||
# https://github.com/elastic/curator/pull/1280
|
# https://github.com/elastic/curator/pull/1280
|
||||||
broken = versionAtLeast click.version "7.0";
|
#broken = versionAtLeast click.version "7.0";
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -3016,18 +3016,9 @@ in
|
|||||||
elasticsearch = elasticsearch7-oss;
|
elasticsearch = elasticsearch7-oss;
|
||||||
};
|
};
|
||||||
|
|
||||||
elasticsearch-curator = with (python3.override {
|
elasticsearch-curator = callPackage ../tools/admin/elasticsearch-curator {
|
||||||
packageOverrides = self: super: {
|
python = python3;
|
||||||
click = super.click.overridePythonAttrs (oldAttrs: rec {
|
|
||||||
version = "6.7";
|
|
||||||
src = oldAttrs.src.override {
|
|
||||||
inherit version;
|
|
||||||
sha256 = "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b";
|
|
||||||
};
|
};
|
||||||
});
|
|
||||||
pyyaml = super.pyyaml_3;
|
|
||||||
};
|
|
||||||
}).pkgs; toPythonApplication elasticsearch-curator;
|
|
||||||
|
|
||||||
embree2 = callPackage ../development/libraries/embree/2.x.nix { };
|
embree2 = callPackage ../development/libraries/embree/2.x.nix { };
|
||||||
|
|
||||||
|
@ -2352,8 +2352,6 @@ in {
|
|||||||
# alias
|
# alias
|
||||||
elasticsearchdsl = self.elasticsearch-dsl;
|
elasticsearchdsl = self.elasticsearch-dsl;
|
||||||
|
|
||||||
elasticsearch-curator = callPackage ../development/python-modules/elasticsearch-curator { };
|
|
||||||
|
|
||||||
elementpath = callPackage ../development/python-modules/elementpath { };
|
elementpath = callPackage ../development/python-modules/elementpath { };
|
||||||
|
|
||||||
entrypoints = callPackage ../development/python-modules/entrypoints { };
|
entrypoints = callPackage ../development/python-modules/entrypoints { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user