nixpkgs/pkgs/servers/h2/default.nix

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

44 lines
1.2 KiB
Nix
Raw Normal View History

2023-11-15 20:17:19 +03:00
{ lib, maven, fetchFromGitHub, jre, makeWrapper, nix-update-script }:
maven.buildMavenPackage rec {
pname = "h2";
version = "2.2.224";
outputs = [ "out" "doc" ];
2017-01-15 16:01:07 +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
};
mvnParameters = "-f h2/pom.xml -DskipTests";
mvnHash = "sha256-hUzE4F+RNCAfoY836pjrivf04xqN4m9SkiLXhmVzZRA=";
2022-02-02 14:43:55 +03:00
nativeBuildInputs = [ makeWrapper ];
2017-01-15 16:01:07 +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
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
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
meta = with lib; {
2017-01-15 16:01:07 +03:00
description = "The Java SQL database";
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
};
}