jbidwatcher: generalized java support so that the package can be built on Darwin, too

svn path=/nixpkgs/trunk/; revision=27923
This commit is contained in:
Peter Simons 2011-07-24 20:26:28 +00:00
parent 20ebca303e
commit 7e9676bab5
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, jre }:
{ stdenv, fetchurl, java }:
stdenv.mkDerivation rec {
pname = "jbidwatcher";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0nrs9ly56cqn33dm1sjm53pzj1cf7jncwn4c8v0xyva4jqyz2y5p";
};
buildInputs = [ jre ];
buildInputs = [ java ];
jarfile = "$out/share/java/${pname}/JBidwatcher.jar";
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
installPhase = ''
ensureDir "$out/bin"
echo > "$out/bin/${pname}" "#!/bin/sh"
echo >>"$out/bin/${pname}" "${jre}/bin/java -Xmx512m -jar ${jarfile}"
echo >>"$out/bin/${pname}" "${java}/bin/java -Xmx512m -jar ${jarfile}"
chmod +x "$out/bin/${pname}"
install -D -m644 ${src} ${jarfile}
'';

View File

@ -6427,7 +6427,9 @@ let
inherit (gnome) libglade;
};
jbidwatcher = callPackage ../applications/misc/jbidwatcher { };
jbidwatcher = callPackage ../applications/misc/jbidwatcher {
java = if stdenv.isLinux then jre else jdk;
};
qrdecode = builderDefsPackage (import ../tools/graphics/qrdecode) {
inherit libpng opencv;