diff --git a/pkgs/by-name/sc/schemaspy/package.nix b/pkgs/by-name/sc/schemaspy/package.nix new file mode 100644 index 000000000000..4c5ac81c879a --- /dev/null +++ b/pkgs/by-name/sc/schemaspy/package.nix @@ -0,0 +1,53 @@ +{ + lib, + fetchFromGitHub, + graphviz, + jre, + makeWrapper, + maven, + nix-update-script, +}: + +maven.buildMavenPackage rec { + pname = "schemaspy"; + version = "6.2.4"; + + src = fetchFromGitHub { + owner = "schemaspy"; + repo = "schemaspy"; + rev = "refs/tags/v${version}"; + hash = "sha256-yEqhLpGrJ4hki8o+u+bigVXv+3YvEb8TvHDTYsEl8z4="; + }; + + mvnParameters = "-Dmaven.test.skip=true -Dmaven.buildNumber.skip=true"; + mvnHash = "sha256-LCPRiY/DDSUnLGnaFUS9PPKnh3TmSyAOqKfEKRLRjpg="; + + nativeBuildInputs = [ + makeWrapper + ]; + + installPhase = '' + 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 : ${lib.makeBinPath [ graphviz ]} + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + homepage = "https://schemaspy.org"; + description = "Document your database simply and easily"; + mainProgram = "schemaspy"; + license = lib.licenses.lgpl3Plus; + maintainers = with lib.maintainers; [ + jraygauthier + anthonyroussel + ]; + }; +} diff --git a/pkgs/development/tools/database/schemaspy/default.nix b/pkgs/development/tools/database/schemaspy/default.nix deleted file mode 100644 index 5e07beaff6f7..000000000000 --- a/pkgs/development/tools/database/schemaspy/default.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ lib -, maven -, jre -, makeWrapper -, git -, fetchFromGitHub -, graphviz -, ensureNewerSourcesHook -}: - -maven.buildMavenPackage rec { - pname = "schemaspy"; - version = "6.1.1-SNAPSHOT"; - - src = fetchFromGitHub { - owner = "schemaspy"; - repo = "schemaspy"; - rev = "110b1614f9ae4aec0e4dc4e8f0e7c647274d3af6"; - hash = "sha256-X5B34zGhD/NxcK8TQvwdk1NljGJ1HwfBp47ocbE4HiU="; - }; - - 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="; - - 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 - - makeWrapper ${jre}/bin/java $out/bin/schemaspy \ - --add-flags "-jar $out/share/java/${pname}-${version}.jar" \ - --prefix PATH : "$wrappedPath" - ''; - - meta = with lib; { - homepage = "https://schemaspy.org"; - description = "Document your database simply and easily"; - mainProgram = "schemaspy"; - license = licenses.lgpl3Plus; - maintainers = with maintainers; [ jraygauthier ]; - }; -} - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fae6f5baeb00..6a5397533015 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18854,8 +18854,6 @@ with pkgs; shellharden = callPackage ../development/tools/shellharden { }; - schemaspy = callPackage ../development/tools/database/schemaspy { }; - scenebuilder = callPackage ../development/tools/scenebuilder { }; scenic-view = callPackage ../development/tools/scenic-view { };