2023-11-15 20:17:19 +03:00
|
|
|
{ lib, maven, fetchFromGitHub, jre, makeWrapper, nix-update-script }:
|
2023-11-15 20:15:53 +03:00
|
|
|
|
|
|
|
maven.buildMavenPackage rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "h2";
|
2023-11-15 20:15:53 +03:00
|
|
|
version = "2.2.224";
|
|
|
|
|
|
|
|
outputs = [ "out" "doc" ];
|
2017-01-15 16:01:07 +03:00
|
|
|
|
2023-11-15 20:15:53 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "h2database";
|
|
|
|
repo = "h2database";
|
|
|
|
rev = "refs/tags/version-${version}";
|
|
|
|
hash = "sha256-pS9jSiuInA0eULPOZK5cjwr9y5KDVY51blhZ9vs4z+g=";
|
2017-01-15 16:01:07 +03:00
|
|
|
};
|
|
|
|
|
2023-11-15 20:15:53 +03:00
|
|
|
mvnParameters = "-f h2/pom.xml -DskipTests";
|
|
|
|
mvnHash = "sha256-hUzE4F+RNCAfoY836pjrivf04xqN4m9SkiLXhmVzZRA=";
|
2022-02-02 14:43:55 +03:00
|
|
|
|
2021-02-07 12:17:39 +03:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-01-15 16:01:07 +03:00
|
|
|
|
2023-11-15 20:15:53 +03:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/java
|
|
|
|
install -Dm644 h2/target/h2-${version}.jar $out/share/java
|
2017-01-15 16:01:07 +03:00
|
|
|
|
2023-11-15 20:15:53 +03:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/h2 \
|
|
|
|
--add-flags "-cp \"$out/share/java/h2-${version}.jar:\$H2DRIVERS:\$CLASSPATH\" org.h2.tools.Console"
|
2017-01-15 16:01:07 +03:00
|
|
|
|
2023-11-15 20:15:53 +03:00
|
|
|
mkdir -p $doc/share/doc/h2
|
|
|
|
cp -r h2/src/docsrc/* $doc/share/doc/h2
|
|
|
|
'';
|
2017-01-15 16:01:07 +03:00
|
|
|
|
2023-11-15 20:17:19 +03:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "^version-([0-9.]+)$" ];
|
|
|
|
};
|
2017-01-15 16:01:07 +03:00
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2017-01-15 16:01:07 +03:00
|
|
|
description = "The Java SQL database";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "http://www.h2database.com/html/main.html";
|
2017-01-15 16:01:07 +03:00
|
|
|
license = licenses.mpl20;
|
2021-01-15 10:07:56 +03:00
|
|
|
platforms = lib.platforms.linux;
|
2023-11-15 20:17:50 +03:00
|
|
|
maintainers = with maintainers; [ mahe anthonyroussel ];
|
2017-01-15 16:01:07 +03:00
|
|
|
};
|
|
|
|
}
|