From 87b9c4a6b6e0c382f744438c5fa52fbff97b3e54 Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Wed, 27 Apr 2016 20:17:01 -0400 Subject: [PATCH 1/2] zookeeper: replace tabs with spaces --- pkgs/servers/zookeeper/default.nix | 52 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pkgs/servers/zookeeper/default.nix b/pkgs/servers/zookeeper/default.nix index 307993a958ad..4512bfcfc94f 100644 --- a/pkgs/servers/zookeeper/default.nix +++ b/pkgs/servers/zookeeper/default.nix @@ -1,36 +1,36 @@ { stdenv, fetchurl, jre, makeWrapper, bash }: stdenv.mkDerivation rec { - name = "zookeeper-3.4.6"; + name = "zookeeper-3.4.6"; - src = fetchurl { - url = "mirror://apache/zookeeper/${name}/${name}.tar.gz"; - sha256 = "01b3938547cd620dc4c93efe07c0360411f4a66962a70500b163b59014046994"; - }; + src = fetchurl { + url = "mirror://apache/zookeeper/${name}/${name}.tar.gz"; + sha256 = "01b3938547cd620dc4c93efe07c0360411f4a66962a70500b163b59014046994"; + }; - buildInputs = [ makeWrapper jre ]; + buildInputs = [ makeWrapper jre ]; - phases = ["unpackPhase" "installPhase"]; + phases = ["unpackPhase" "installPhase"]; - installPhase = '' - mkdir -p $out - cp -R conf docs lib ${name}.jar $out - mkdir -p $out/bin - cp -R bin/{zkCli,zkCleanup,zkEnv}.sh $out/bin - for i in $out/bin/{zkCli,zkCleanup}.sh; do - wrapProgram $i \ - --set JAVA_HOME "${jre}" \ - --prefix PATH : "${bash}/bin" - done - chmod -x $out/bin/zkEnv.sh - ''; + installPhase = '' + mkdir -p $out + cp -R conf docs lib ${name}.jar $out + mkdir -p $out/bin + cp -R bin/{zkCli,zkCleanup,zkEnv}.sh $out/bin + for i in $out/bin/{zkCli,zkCleanup}.sh; do + wrapProgram $i \ + --set JAVA_HOME "${jre}" \ + --prefix PATH : "${bash}/bin" + done + chmod -x $out/bin/zkEnv.sh + ''; - meta = with stdenv.lib; { - homepage = "http://zookeeper.apache.org"; - description = "Apache Zookeeper"; - license = licenses.asl20; - maintainers = [ maintainers.nathan-gs ]; - platforms = platforms.unix; - }; + meta = with stdenv.lib; { + homepage = "http://zookeeper.apache.org"; + description = "Apache Zookeeper"; + license = licenses.asl20; + maintainers = [ maintainers.nathan-gs ]; + platforms = platforms.unix; + }; } From e28e3d576362335b5ac7822478b2d4dc6efc4253 Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Wed, 27 Apr 2016 20:19:12 -0400 Subject: [PATCH 2/2] zookeeper: include zooInspector.sh ZooInspector is a Swing based GUI for interacting with Zookeeper. --- pkgs/servers/zookeeper/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/zookeeper/default.nix b/pkgs/servers/zookeeper/default.nix index 4512bfcfc94f..7cf95ca7e9e6 100644 --- a/pkgs/servers/zookeeper/default.nix +++ b/pkgs/servers/zookeeper/default.nix @@ -23,14 +23,28 @@ stdenv.mkDerivation rec { --prefix PATH : "${bash}/bin" done chmod -x $out/bin/zkEnv.sh + + mkdir -p $out/share/zooinspector + cp -r contrib/ZooInspector/{${name}-ZooInspector.jar,icons,lib,config} $out/share/zooinspector + + classpath="$out/${name}.jar:$out/share/zooinspector/${name}-ZooInspector.jar" + for jar in $out/lib/*.jar $out/share/zooinspector/lib/*.jar; do + classpath="$classpath:$jar" + done + + cat << EOF > $out/bin/zooInspector.sh + #!${stdenv.shell} + cd $out/share/zooinspector + exec ${jre}/bin/java -cp $classpath org.apache.zookeeper.inspector.ZooInspector + EOF + chmod +x $out/bin/zooInspector.sh ''; meta = with stdenv.lib; { homepage = "http://zookeeper.apache.org"; description = "Apache Zookeeper"; license = licenses.asl20; - maintainers = [ maintainers.nathan-gs ]; + maintainers = with maintainers; [ nathan-gs cstrahan ]; platforms = platforms.unix; }; - }