2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, makeWrapper, jre }:
|
2007-09-06 16:38:32 +01:00
|
|
|
|
2019-11-08 10:56:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hsqldb";
|
2020-07-03 15:46:26 +01:00
|
|
|
version = "2.5.1";
|
2021-01-23 17:15:07 +00:00
|
|
|
underscoreMajMin = lib.strings.replaceChars ["."] ["_"] (lib.versions.majorMinor version);
|
2007-09-06 16:38:32 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-11-08 10:56:29 +00:00
|
|
|
url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip";
|
2020-07-03 15:46:26 +01:00
|
|
|
sha256 = "0yd9px85y036bp3q1assj3fgaykxrwnhnc7cbjgic39cykfy5hrg";
|
2007-09-06 16:38:32 +01:00
|
|
|
};
|
|
|
|
|
2019-11-08 10:56:29 +00:00
|
|
|
nativeBuildInputs = [ unzip makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/lib $out/bin
|
|
|
|
cp -R hsqldb/lib/*.jar $out/lib
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/hsqldb --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/runServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/runManagerSwing --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing"
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/runWebServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.WebServer"
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/runManager --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManager"
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/sqltool --add-flags "-jar $out/lib/sqltool.jar"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2018-11-01 20:12:48 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-11-08 10:56:29 +00:00
|
|
|
homepage = "http://hsqldb.org";
|
|
|
|
description = "A relational, embedable database management system written in Java and a set of related tools";
|
2018-11-01 20:12:48 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.bsd3;
|
2016-08-02 17:06:29 +01:00
|
|
|
};
|
2007-09-06 16:38:32 +01:00
|
|
|
}
|