diff options
author | Evgeny Egorochkin <phreedom@yandex.ru> | 2014-07-28 11:37:00 +0300 |
---|---|---|
committer | Evgeny Egorochkin <phreedom@yandex.ru> | 2014-07-28 11:37:58 +0300 |
commit | 30431e71608576baf880567b2894ad2a542f8d5e (patch) | |
tree | dc82e0db4694c79bc7f0cec35bf0d32723098638 /pkgs | |
parent | 5f01cc70d3a65a4d904a2040343ca5bfdfbaaff3 (diff) |
rabbitmq-client-java: refactor the package according to the guidelines from nixpkgs manual
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/rabbitmq-java-client/default.nix | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/pkgs/development/libraries/rabbitmq-java-client/default.nix b/pkgs/development/libraries/rabbitmq-java-client/default.nix index 1f9c92dbbb839..2183aa83e20e0 100644 --- a/pkgs/development/libraries/rabbitmq-java-client/default.nix +++ b/pkgs/development/libraries/rabbitmq-java-client/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, ant, jdk, python }: +{ fetchurl, stdenv, ant, jdk, jre, python, makeWrapper }: stdenv.mkDerivation rec { name = "rabbitmq-java-client-3.3.4"; @@ -8,21 +8,17 @@ stdenv.mkDerivation rec { sha256 = "03kspkgzzjsbq6f8yl2zj5m30qwgxv3l58hrbf6gcgxb5rpfk6sh"; }; - buildInputs = [ ant jdk python ]; + buildInputs = [ ant jdk python makeWrapper ]; buildPhase = "ant dist"; installPhase = '' - mkdir -p $out/bin $out/lib - cp build/lib/*.jar lib/*.jar $out/lib/ + mkdir -p $out/bin $out/share/java + cp build/lib/*.jar lib/*.jar $out/share/java # There is a script in the source archive, but ours is cleaner - cat > "$out/bin/PerfTest" <<EOF - #!${stdenv.shell} - java_exec_args="-Djava.awt.headless=true" - exec ${jdk.jre}/bin/java \$java_exec_args -classpath "$out/lib/*" com.rabbitmq.examples.PerfTest "\$@" - EOF - chmod a+x $out/bin/PerfTest + makeWrapper ${jre}/bin/java $out/bin/PerfTest \ + --add-flags "-Djava.awt.headless=true -cp $out/share/java/\* com.rabbitmq.examples.PerfTest" ''; meta = with stdenv.lib; { |