12 , ensureNewerSourcesHook
16 version = "6.1.1-SNAPSHOT";
19 src = fetchFromGitHub {
22 rev = "110b1614f9ae4aec0e4dc4e8f0e7c647274d3af6";
23 sha256 = "sha256-X5B34zGhD/NxcK8TQvwdk1NljGJ1HwfBp47ocbE4HiU=";
26 deps = stdenv.mkDerivation {
27 name = "${pname}-${version}-deps";
30 nativeBuildInputs = [ jdk maven git ];
31 buildInputs = [ jre ];
34 mvn package -Dmaven.test.skip=true -Dmaven.repo.local=$out/.m2 -Dmaven.wagon.rto=5000
37 # keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
39 find $out/.m2 -type f -regex '.+\(\.lastUpdated\|resolver-status\.properties\|_remote\.repositories\)' -delete
40 find $out/.m2 -type f -iname '*.pom' -exec sed -i -e 's/\r\+$//' {} \;
43 outputHashAlgo = "sha256";
44 outputHashMode = "recursive";
45 outputHash = "sha256-CUFA9L6qqjo3Jp5Yy1yCqbS9QAEb9PElys4ArPa9VhA=";
50 stdenv.mkDerivation rec {
51 inherit version pname src;
59 # the build system gets angry if it doesn't see git (even though it's not
60 # actually in a git repository)
63 # springframework boot gets angry about 1970 sources
64 # fix from https://github.com/nix-community/mavenix/issues/25
65 (ensureNewerSourcesHook { year = "1980"; })
68 wrappedPath = lib.makeBinPath [
76 mvn package --offline -Dmaven.test.skip=true -Dmaven.repo.local=$(cp -dpR ${deps}/.m2 ./ && chmod +w -R .m2 && pwd)/.m2
80 install -D target/${pname}-${version}.jar $out/share/java/${pname}-${version}.jar
82 makeWrapper ${jre}/bin/java $out/bin/schemaspy \
83 --add-flags "-jar $out/share/java/${pname}-${version}.jar" \
84 --prefix PATH : "$wrappedPath"
88 homepage = "https://schemaspy.org";
89 description = "Document your database simply and easily";
90 license = licenses.lgpl3Plus;
91 maintainers = with maintainers; [ jraygauthier ];