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 Permalink Normal View History

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