diff --git a/pkgs/development/python-modules/elasticsearch/default.nix b/pkgs/development/python-modules/elasticsearch/default.nix new file mode 100644 index 00000000000..9b90b09c5f5 --- /dev/null +++ b/pkgs/development/python-modules/elasticsearch/default.nix @@ -0,0 +1,29 @@ +{ buildPythonPackage +, fetchPypi +, urllib3, requests +, nosexcover, mock +, stdenv +}: + +buildPythonPackage (rec { + pname = "elasticsearch"; + version = "6.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "029q603g95fzkh87xkbxxmjfq5s9xkr9y27nfik6d4prsl0zxmlz"; + }; + + # Check is disabled because running them destroy the content of the local cluster! + # https://github.com/elasticsearch/elasticsearch-py/tree/master/test_elasticsearch + doCheck = false; + propagatedBuildInputs = [ urllib3 requests ]; + buildInputs = [ nosexcover mock ]; + + meta = with stdenv.lib; { + description = "Official low-level client for Elasticsearch"; + homepage = https://github.com/elasticsearch/elasticsearch-py; + license = licenses.asl20; + maintainers = with maintainers; [ desiderius ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 855b340071a..ee6996e55b0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4431,29 +4431,7 @@ in { edward = callPackage ../development/python-modules/edward { }; - elasticsearch = buildPythonPackage (rec { - pname = "elasticsearch"; - version = "6.0.0"; - name = "${pname}-${version}"; - - src = fetchPypi { - inherit pname version; - sha256 = "029q603g95fzkh87xkbxxmjfq5s9xkr9y27nfik6d4prsl0zxmlz"; - }; - - # Check is disabled because running them destroy the content of the local cluster! - # https://github.com/elasticsearch/elasticsearch-py/tree/master/test_elasticsearch - doCheck = false; - propagatedBuildInputs = with self; [ urllib3 requests ]; - buildInputs = with self; [ nosexcover mock ]; - - meta = { - description = "Official low-level client for Elasticsearch"; - homepage = https://github.com/elasticsearch/elasticsearch-py; - license = licenses.asl20; - maintainers = with maintainers; [ desiderius ]; - }; - }); + elasticsearch = callPackage ../development/python-modules/elasticsearch { }; elasticsearchdsl = buildPythonPackage (rec { name = "elasticsearch-dsl-0.0.9";