nixpkgs/pkgs/servers/h2/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.3 KiB
Nix
Raw Normal View History

2023-11-15 17:17:19 +00:00
{ lib, maven, fetchFromGitHub, jre, makeWrapper, nix-update-script }:
maven.buildMavenPackage rec {
pname = "h2";
version = "2.2.224";
outputs = [ "out" "doc" ];
2017-01-15 13:01:07 +00:00
src = fetchFromGitHub {
owner = "h2database";
repo = "h2database";
rev = "refs/tags/version-${version}";
hash = "sha256-pS9jSiuInA0eULPOZK5cjwr9y5KDVY51blhZ9vs4z+g=";
2017-01-15 13:01:07 +00:00
};
mvnParameters = "-f h2/pom.xml -DskipTests";
mvnHash = "sha256-hUzE4F+RNCAfoY836pjrivf04xqN4m9SkiLXhmVzZRA=";
2022-02-02 11:43:55 +00:00
nativeBuildInputs = [ makeWrapper ];
2017-01-15 13:01:07 +00:00
installPhase = ''
mkdir -p $out/share/java
install -Dm644 h2/target/h2-${version}.jar $out/share/java
2017-01-15 13:01:07 +00: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 13:01:07 +00:00
mkdir -p $doc/share/doc/h2
cp -r h2/src/docsrc/* $doc/share/doc/h2
'';
2017-01-15 13:01:07 +00:00
2023-11-15 17:17:19 +00:00
passthru.updateScript = nix-update-script {
extraArgs = [ "--version-regex" "^version-([0-9.]+)$" ];
};
2017-01-15 13:01:07 +00:00
meta = with lib; {
2017-01-15 13:01:07 +00:00
description = "The Java SQL database";
2023-11-15 17:17:32 +00:00
homepage = "https://h2database.com/html/main.html";
changelog = "https://h2database.com/html/changelog.html";
2017-01-15 13:01:07 +00:00
license = licenses.mpl20;
2023-11-15 17:35:42 +00:00
platforms = lib.platforms.unix;
2023-11-15 17:17:50 +00:00
maintainers = with maintainers; [ mahe anthonyroussel ];
2023-11-15 17:17:32 +00:00
mainProgram = "h2";
2017-01-15 13:01:07 +00:00
};
}