nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

schemaspy: 6.1.0 -> dev

Unfortunately, schemaspy is broken with graphviz 3.0.0, and they haven't
tagged their releases in a very long time.

Let's just build from source and not worry about it.

+63 -11
+63 -11
pkgs/development/tools/database/schemaspy/default.nix
··· 1 - { lib, stdenv, fetchurl, jre, makeWrapper, graphviz }: 1 + { lib 2 + , stdenv 3 + , callPackage 4 + , maven 5 + , jdk 6 + , jre 7 + , buildMaven 8 + , makeWrapper 9 + , git 10 + , fetchFromGitHub 11 + , graphviz 12 + , ensureNewerSourcesHook 13 + }: 2 14 3 - stdenv.mkDerivation rec { 4 - version = "6.1.0"; 15 + let 16 + version = "6.1.1-SNAPSHOT"; 5 17 pname = "schemaspy"; 6 18 7 - src = fetchurl { 8 - url = "https://github.com/schemaspy/schemaspy/releases/download/v${version}/${pname}-${version}.jar"; 9 - sha256 = "0lgz6b17hx9857fb2l03ggz8y3n8a37vrcsylif0gmkwj1v4qgl7"; 19 + src = fetchFromGitHub { 20 + owner = "schemaspy"; 21 + repo = "schemaspy"; 22 + rev = "110b1614f9ae4aec0e4dc4e8f0e7c647274d3af6"; 23 + sha256 = "sha256-X5B34zGhD/NxcK8TQvwdk1NljGJ1HwfBp47ocbE4HiU="; 10 24 }; 11 25 12 - dontUnpack = true; 26 + deps = stdenv.mkDerivation { 27 + name = "${pname}-${version}-deps"; 28 + inherit src; 29 + 30 + nativeBuildInputs = [ jdk maven git ]; 31 + buildInputs = [ jre ]; 32 + 33 + buildPhase = '' 34 + mvn package -Dmaven.test.skip=true -Dmaven.repo.local=$out/.m2 -Dmaven.wagon.rto=5000 35 + ''; 36 + 37 + # keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside 38 + installPhase = '' 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\+$//' {} \; 41 + ''; 42 + 43 + outputHashAlgo = "sha256"; 44 + outputHashMode = "recursive"; 45 + outputHash = "sha256-CUFA9L6qqjo3Jp5Yy1yCqbS9QAEb9PElys4ArPa9VhA="; 46 + 47 + doCheck = false; 48 + }; 49 + in 50 + stdenv.mkDerivation rec { 51 + inherit version pname src; 13 52 14 53 buildInputs = [ 15 - jre 54 + maven 16 55 ]; 17 56 18 57 nativeBuildInputs = [ 19 58 makeWrapper 59 + # the build system gets angry if it doesn't see git (even though it's not 60 + # actually in a git repository) 61 + git 62 + 63 + # springframework boot gets angry about 1970 sources 64 + # fix from https://github.com/nix-community/mavenix/issues/25 65 + (ensureNewerSourcesHook { year = "1980"; }) 20 66 ]; 21 67 22 68 wrappedPath = lib.makeBinPath [ 23 69 graphviz 24 70 ]; 25 71 72 + buildPhase = '' 73 + VERSION=${version} 74 + SEMVER_STR=${version} 75 + 76 + mvn package --offline -Dmaven.test.skip=true -Dmaven.repo.local=$(cp -dpR ${deps}/.m2 ./ && chmod +w -R .m2 && pwd)/.m2 77 + ''; 78 + 26 79 installPhase = '' 27 - install -D ${src} "$out/share/java/${pname}-${version}.jar" 80 + install -D target/${pname}-${version}.jar $out/share/java/${pname}-${version}.jar 28 81 29 82 makeWrapper ${jre}/bin/java $out/bin/schemaspy \ 30 83 --add-flags "-jar $out/share/java/${pname}-${version}.jar" \ ··· 87 34 meta = with lib; { 88 35 homepage = "https://schemaspy.org"; 89 36 description = "Document your database simply and easily"; 90 - sourceProvenance = with sourceTypes; [ binaryBytecode ]; 91 - license = licenses.mit; 37 + license = licenses.lgpl3Plus; 92 38 maintainers = with maintainers; [ jraygauthier ]; 93 39 }; 94 40 }