2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, makeWrapper, jre }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hsqldb";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "2.6.1";
|
2021-02-05 17:12:51 +00:00
|
|
|
underscoreMajMin = lib.strings.replaceChars ["."] ["_"] (lib.versions.majorMinor version);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-cixyEwjEt68UOotd1TcJNyVUxTRDx4XyfyYg9k6kRtQ=";
|
2020-04-24 23:36:52 +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
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://hsqldb.org";
|
|
|
|
description = "A relational, embedable database management system written in Java and a set of related tools";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|