Anthony ROUSSEL
2024-08-24 16:30:34 +02:00
parent 9d8b60c697
commit eed465da42
@@ -2,59 +2,39 @@
, maven
, jre
, makeWrapper
, git
, fetchFromGitHub
, graphviz
, ensureNewerSourcesHook
, nix-update-script
}:
maven.buildMavenPackage rec {
pname = "schemaspy";
version = "6.1.1-SNAPSHOT";
version = "6.2.4";
src = fetchFromGitHub {
owner = "schemaspy";
repo = "schemaspy";
rev = "110b1614f9ae4aec0e4dc4e8f0e7c647274d3af6";
hash = "sha256-X5B34zGhD/NxcK8TQvwdk1NljGJ1HwfBp47ocbE4HiU=";
rev = "refs/tags/v${version}";
hash = "sha256-yEqhLpGrJ4hki8o+u+bigVXv+3YvEb8TvHDTYsEl8z4=";
};
mvnParameters = "-Dmaven.test.skip=true";
mvnFetchExtraArgs = {
nativeBuildInputs = [
# the build system gets angry if it doesn't see git (even though it's not
# actually in a git repository)
git
maven
];
};
mvnHash = "sha256-1x6cNt6t3FnjRNg8iNYflkyDnuPFXGKoxhVJWoz2jIU=";
mvnParameters = "-Dmaven.test.skip=true -Dmaven.buildNumber.skip=true";
mvnHash = "sha256-LCPRiY/DDSUnLGnaFUS9PPKnh3TmSyAOqKfEKRLRjpg=";
nativeBuildInputs = [
makeWrapper
git
# springframework boot gets angry about 1970 sources
# fix from https://github.com/nix-community/mavenix/issues/25
(ensureNewerSourcesHook { year = "1980"; })
];
wrappedPath = lib.makeBinPath [
graphviz
];
preBuild = ''
VERSION=${version}
SEMVER_STR=${version}
'';
installPhase = ''
install -D target/${pname}-${version}.jar $out/share/java/${pname}-${version}.jar
runHook preInstall
install -D target/${pname}-${version}-app.jar $out/share/java/${pname}-${version}.jar
makeWrapper ${jre}/bin/java $out/bin/schemaspy \
--add-flags "-jar $out/share/java/${pname}-${version}.jar" \
--prefix PATH : "$wrappedPath"
--prefix PATH : ${lib.makeBinPath [ graphviz ]}
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
@@ -67,4 +47,3 @@ maven.buildMavenPackage rec {
maintainers = with maintainers; [ jraygauthier ];
};
}