1 { lib, stdenv, fetchurl, unzip, makeWrapper, jre }:
3 stdenv.mkDerivation rec {
6 underscoreMajMin = lib.strings.replaceChars ["."] ["_"] (lib.versions.majorMinor version);
9 url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip";
10 sha256 = "sha256-d0FruJXNnwme1gPHWcIXpD2LO0fL8CzZOn8H14Quo50=";
13 nativeBuildInputs = [ unzip makeWrapper ];
14 buildInputs = [ jre ];
19 mkdir -p $out/lib $out/bin
20 cp -R hsqldb/lib/*.jar $out/lib
22 makeWrapper ${jre}/bin/java $out/bin/hsqldb --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
23 makeWrapper ${jre}/bin/java $out/bin/runServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
24 makeWrapper ${jre}/bin/java $out/bin/runManagerSwing --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing"
25 makeWrapper ${jre}/bin/java $out/bin/runWebServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.WebServer"
26 makeWrapper ${jre}/bin/java $out/bin/runManager --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManager"
27 makeWrapper ${jre}/bin/java $out/bin/sqltool --add-flags "-jar $out/lib/sqltool.jar"
33 homepage = "http://hsqldb.org";
34 description = "A relational, embedable database management system written in Java and a set of related tools";
35 sourceProvenance = with sourceTypes; [ binaryBytecode ];
36 platforms = platforms.unix;
37 license = licenses.bsd3;