From 2cc11dd21a22995ea3c10eb7ca62a04f6bca2f2a Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Sat, 5 Jul 2014 10:58:08 +0200 Subject: [PATCH] elasticsearch: fix darwin build --- pkgs/servers/search/elasticsearch/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/search/elasticsearch/default.nix b/pkgs/servers/search/elasticsearch/default.nix index b227832ad734..5b31207cb4ef 100644 --- a/pkgs/servers/search/elasticsearch/default.nix +++ b/pkgs/servers/search/elasticsearch/default.nix @@ -1,4 +1,7 @@ { stdenv, fetchurl, makeWrapper, jre, utillinux }: + +with stdenv.lib; + stdenv.mkDerivation rec { name = "elasticsearch-1.2.1"; @@ -9,7 +12,7 @@ stdenv.mkDerivation rec { patches = [ ./es-home.patch ]; - buildInputs = [ makeWrapper jre utillinux ]; + buildInputs = [ makeWrapper jre ] ++ optional (!stdenv.isDarwin) utillinux; installPhase = '' mkdir -p $out @@ -21,7 +24,7 @@ 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/" \ + ${optionalString (!stdenv.isDarwin) ''--prefix PATH : "${utillinux}/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}"