From 03519851bc7b90752be9453437a690397c14a0ee Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Thu, 7 Mar 2013 12:36:29 +0100 Subject: [PATCH] Add elasticsearch 0.20.5 --- pkgs/servers/search/elasticsearch/default.nix | 21 +++++++++++++++++++ .../search/elasticsearch/es-home.patch | 20 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 pkgs/servers/search/elasticsearch/default.nix create mode 100644 pkgs/servers/search/elasticsearch/es-home.patch diff --git a/pkgs/servers/search/elasticsearch/default.nix b/pkgs/servers/search/elasticsearch/default.nix new file mode 100644 index 00000000000..9afbc62ce8c --- /dev/null +++ b/pkgs/servers/search/elasticsearch/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl }: +stdenv.mkDerivation rec { + name = "elasticsearch-0.20.5"; + + src = fetchurl { + url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${name}.tar.gz"; + sha256 = "0r0h9znyflajps1k8hl9naixhg1gqmhz7glc009pzzv94ncdzrq1"; + }; + + patches = [ ./es-home.patch ]; + + installPhase = '' + mkdir -p $out + cp -R bin config lib $out + ''; + + meta = { + description = "Open Source, Distributed, RESTful Search Engine"; + license = "ASL2.0"; + }; +} diff --git a/pkgs/servers/search/elasticsearch/es-home.patch b/pkgs/servers/search/elasticsearch/es-home.patch new file mode 100644 index 00000000000..f9e460198a9 --- /dev/null +++ b/pkgs/servers/search/elasticsearch/es-home.patch @@ -0,0 +1,20 @@ +diff -rc elasticsearch-0.20.5/bin/elasticsearch elasticsearch-0.20.5-new/bin/elasticsearch +*** elasticsearch-0.20.5/bin/elasticsearch 2013-03-07 12:16:31.152494626 +0100 +--- elasticsearch-0.20.5-new/bin/elasticsearch 2013-03-07 12:24:41.076081272 +0100 +*************** +*** 62,68 **** + done + + # determine elasticsearch home +! ES_HOME=`dirname "$SCRIPT"`/.. + + # make ELASTICSEARCH_HOME absolute + ES_HOME=`cd "$ES_HOME"; pwd` +--- 62,68 ---- + done + + # determine elasticsearch home +! ES_HOME=${ES_HOME:=`dirname "$SCRIPT"`/..} + + # make ELASTICSEARCH_HOME absolute + ES_HOME=`cd "$ES_HOME"; pwd` diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79699506ce8..2c8ea5659f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -704,6 +704,8 @@ let efibootmgr = callPackage ../tools/system/efibootmgr { }; + elasticsearch = callPackage ../servers/search/elasticsearch { }; + enblendenfuse = callPackage ../tools/graphics/enblend-enfuse { boost = boost149; };