diff options
author | Matthew Brown <matt@ederoyd.co.uk> | 2014-08-24 11:21:41 +0100 |
---|---|---|
committer | Matthew Brown <matt@ederoyd.co.uk> | 2014-08-24 11:21:41 +0100 |
commit | 5ef459fe2dc80e8f25e9ca255d11eabd6eea31cc (patch) | |
tree | d3a469d4554ed9aa52e6b85197fb4a7c858d2761 /pkgs/servers/search | |
parent | 72df3f37e55aa1e14733b03482c602114bf56dcd (diff) | |
parent | aa77fe0fb0f2b6636a57fd2ced4afd6636b4c1e1 (diff) |
Merge branch 'master' into add-sphinx-search
Diffstat (limited to 'pkgs/servers/search')
-rw-r--r-- | pkgs/servers/search/elasticsearch/default.nix | 22 | ||||
-rw-r--r-- | pkgs/servers/search/elasticsearch/plugins.nix | 53 |
2 files changed, 68 insertions, 7 deletions
diff --git a/pkgs/servers/search/elasticsearch/default.nix b/pkgs/servers/search/elasticsearch/default.nix index b227832ad734..967eae40bb1a 100644 --- a/pkgs/servers/search/elasticsearch/default.nix +++ b/pkgs/servers/search/elasticsearch/default.nix @@ -1,15 +1,19 @@ -{ stdenv, fetchurl, makeWrapper, jre, utillinux }: +{ stdenv, fetchurl, makeWrapper, jre, utillinux, getopt }: + +with stdenv.lib; + stdenv.mkDerivation rec { - name = "elasticsearch-1.2.1"; + name = "elasticsearch-1.2.2"; src = fetchurl { url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${name}.tar.gz"; - sha256 = "11lirxl0hb0xfd57accsgldq1adrlv9pak2520jll2sj5gg71cmj"; + sha256 = "1vpvxndcq48rcsgw2jnzdh4fwnf141hf5wjxrjs1g7p2qw0d0cy8"; }; patches = [ ./es-home.patch ]; - buildInputs = [ makeWrapper jre utillinux ]; + buildInputs = [ makeWrapper jre ] ++ + (if (!stdenv.isDarwin) then [utillinux] else [getopt]); installPhase = '' mkdir -p $out @@ -21,14 +25,18 @@ stdenv.mkDerivation rec { # set ES_CLASSPATH and JAVA_HOME wrapProgram $out/bin/elasticsearch \ --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" \ - --prefix PATH : "${utillinux}/bin/" \ + ${if (!stdenv.isDarwin) + then ''--prefix PATH : "${utillinux}/bin/"'' + else ''--prefix PATH : "${getopt}/bin"''} \ --set JAVA_HOME "${jre}" wrapProgram $out/bin/elasticsearch-plugin \ - --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" --set JAVA_HOME "${jre}" + --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" \ + --set JAVA_HOME "${jre}" ''; meta = { description = "Open Source, Distributed, RESTful Search Engine"; - license = "ASL2.0"; + license = stdenv.lib.licenses.asl20; + platforms = platforms.unix; }; } diff --git a/pkgs/servers/search/elasticsearch/plugins.nix b/pkgs/servers/search/elasticsearch/plugins.nix new file mode 100644 index 000000000000..c03a2feae5f2 --- /dev/null +++ b/pkgs/servers/search/elasticsearch/plugins.nix @@ -0,0 +1,53 @@ +{ pkgs, stdenv, fetchurl, unzip, elasticsearch }: + +with pkgs.lib; + +let + esPlugin = a@{ + pluginName, + installPhase ? '' + mkdir -p $out + ES_HOME=$out ${elasticsearch}/bin/elasticsearch-plugin --install ${pluginName} --url file://$src + '', + ... + }: + stdenv.mkDerivation (a // { + inherit installPhase; + unpackPhase = "true"; + buildInputs = [ unzip ]; + meta = a.meta // { + platforms = elasticsearch.meta.platforms; + maintainers = (a.meta.maintainers or []) ++ [ maintainers.offline ]; + }; + }); +in { + elasticsearch_river_jdbc = esPlugin rec { + name = "elasticsearch-river-jdbc-${version}"; + pluginName = "jdbc"; + version = "1.2.1.1"; + src = fetchurl { + url = "http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-river-jdbc/${version}/${name}-plugin.zip"; + sha1 = "68e7e1fdf45d0e5852b21610a84740595223ea11"; + }; + meta = { + homepage = "https://github.com/jprante/elasticsearch-river-jdbc"; + description = "Plugin to fetch data from JDBC sources for indexing into Elasticsearch"; + license = licenses.asl20; + }; + }; + + elasticsearch_analisys_lemmagen = esPlugin rec { + name = "elasticsearch-analysis-lemmagen-${version}"; + pluginName = "elasticsearch-analysis-lemmagen"; + version = "0.1"; + src = fetchurl { + url = "https://github.com/vhyza/elasticsearch-analysis-lemmagen/releases/download/v${version}/${name}-plugin.zip"; + sha256 = "bf7bf5ce3ccdd3afecd0e18cd6fce1ef56f824e41f4ef50553ae598caa5c366d"; + }; + meta = { + homepage = "https://github.com/vhyza/elasticsearch-analysis-lemmagen"; + description = "LemmaGen Analysis plugin provides jLemmaGen lemmatizer as Elasticsearch token filter"; + license = licenses.asl20; + }; + }; +} |