diff --git a/pkgs/tools/misc/plantuml/plantuml-c4.nix b/pkgs/by-name/pl/plantuml-c4/package.nix similarity index 63% rename from pkgs/tools/misc/plantuml/plantuml-c4.nix rename to pkgs/by-name/pl/plantuml-c4/package.nix index 77cfa82e894f..a17aedefee26 100644 --- a/pkgs/tools/misc/plantuml/plantuml-c4.nix +++ b/pkgs/by-name/pl/plantuml-c4/package.nix @@ -1,4 +1,13 @@ -{ lib, stdenv, makeWrapper, fetchzip, runCommand, plantuml, plantuml-c4, jre }: +{ + lib, + stdenv, + fetchzip, + jre, + makeWrapper, + plantuml-c4, + plantuml, + runCommand, +}: # The C4-PlantUML docs say that it suffices to run plantuml with the # -DRELATIVE_INCLUDE="..." arg to make plantuml find the C4 templates @@ -12,13 +21,13 @@ let c4-lib = fetchzip { - url = "https://github.com/plantuml-stdlib/C4-PlantUML/archive/refs/tags/v2.8.0.zip"; - hash = "sha256-pGtTFg7HcAFYPrjd+CAaxS4C6Cqaj94aq45v3NpiAxM="; + url = "https://github.com/plantuml-stdlib/C4-PlantUML/archive/refs/tags/v2.10.0.zip"; + hash = "sha256-p9Njb7VauXVf6yOBDQrO9mS+za9NntFUCK5tig0mH3U="; }; sprites = fetchzip { - url = "https://github.com/tupadr3/plantuml-icon-font-sprites/archive/fa3f885dbd45c9cd0cdf6c0e5e4fb51ec8b76582.zip"; - hash = "sha256-lt9+NNMIaZSkKNsGyHoqXUCTlKmZFGfNYYGjer6X0Xc="; + url = "https://github.com/tupadr3/plantuml-icon-font-sprites/archive/refs/tags/v3.0.0.zip"; + hash = "sha256-I/cR1VPR7aKyTZF9X/4GkgcxV9+sLgNpTZugvCy0Dvs="; }; # In order to pre-fix the plantuml.jar parameter with the argument @@ -26,22 +35,24 @@ let # This way the plantuml derivation can remain unchanged. plantumlWithExtraPath = let - plantumlIncludePath = lib.concatStringsSep ":" [ c4-lib sprites ]; + plantumlIncludePath = lib.concatStringsSep ":" [ + c4-lib + sprites + ]; includeFlag = "-Dplantuml.include.path=${lib.escapeShellArg plantumlIncludePath}"; - postFixedJre = - runCommand "jre-postfixed" { nativeBuildInputs = [ makeWrapper ]; } '' - mkdir -p $out/bin + postFixedJre = runCommand "jre-postfixed" { nativeBuildInputs = [ makeWrapper ]; } '' + mkdir -p $out/bin - makeWrapper ${jre}/bin/java $out/bin/java \ - --add-flags ${lib.escapeShellArg includeFlag} - ''; + makeWrapper ${jre}/bin/java $out/bin/java \ + --add-flags ${lib.escapeShellArg includeFlag} + ''; in plantuml.override { jre = postFixedJre; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "plantuml-c4"; - version = "2.8.0"; + version = "2.10.0"; nativeBuildInputs = [ makeWrapper ]; @@ -55,20 +66,24 @@ stdenv.mkDerivation rec { ''; passthru.tests.example-c4-diagram = - runCommand "c4-plantuml-sample.png" { nativeBuildInputs = [ plantuml-c4 ]; } '' - sed 's/https:.*\///' "${c4-lib}/samples/C4_Context Diagram Sample - enterprise.puml" > sample.puml - plantuml sample.puml -o $out + runCommand "c4-plantuml-sample.png" { nativeBuildInputs = [ plantuml-c4 ]; } + '' + sed 's/https:.*\///' "${c4-lib}/samples/C4_Context Diagram Sample - enterprise.puml" > sample.puml + plantuml sample.puml -o $out - sed 's/!include ..\//!include /' ${sprites}/examples/complex-example.puml > sprites.puml - plantuml sprites.puml -o $out - ''; + sed 's/!include ..\//!include /' ${sprites}/examples/complex-example.puml > sprites.puml + plantuml sprites.puml -o $out + ''; meta = with lib; { description = "PlantUML bundled with C4-Plantuml and plantuml sprites library"; mainProgram = "plantuml"; homepage = "https://github.com/plantuml-stdlib/C4-PlantUML"; license = licenses.mit; - maintainers = with maintainers; [ tfc ]; + maintainers = with maintainers; [ + tfc + anthonyroussel + ]; platforms = platforms.unix; }; } diff --git a/pkgs/tools/misc/plantuml-server/default.nix b/pkgs/by-name/pl/plantuml-server/package.nix similarity index 75% rename from pkgs/tools/misc/plantuml-server/default.nix rename to pkgs/by-name/pl/plantuml-server/package.nix index 0eed91bdb99e..189da083d1ef 100644 --- a/pkgs/tools/misc/plantuml-server/default.nix +++ b/pkgs/by-name/pl/plantuml-server/package.nix @@ -1,18 +1,22 @@ -{ lib, stdenv, fetchurl, nixosTests }: +{ + lib, + stdenv, + fetchurl, + nixosTests, +}: -let - version = "1.2024.7"; -in stdenv.mkDerivation rec { pname = "plantuml-server"; - inherit version; + version = "1.2024.7"; + src = fetchurl { url = "https://github.com/plantuml/plantuml-server/releases/download/v${version}/plantuml-v${version}.war"; - sha256 = "sha256-9YTclV+FoiNbcpeNtlbbozqjB1BN9EJn03CzyHDbC+8="; + hash = "sha256-9YTclV+FoiNbcpeNtlbbozqjB1BN9EJn03CzyHDbC+8="; }; dontUnpack = true; - installPhase = '' + + postInstall = '' mkdir -p "$out/webapps" cp "$src" "$out/webapps/plantuml.war" ''; @@ -27,6 +31,9 @@ stdenv.mkDerivation rec { sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.gpl3Plus; platforms = platforms.all; - maintainers = with maintainers; [ truh ]; + maintainers = with maintainers; [ + truh + anthonyroussel + ]; }; } diff --git a/pkgs/tools/misc/plantuml/default.nix b/pkgs/by-name/pl/plantuml/package.nix similarity index 71% rename from pkgs/tools/misc/plantuml/default.nix rename to pkgs/by-name/pl/plantuml/package.nix index 83476bd99573..cfb35e1d7c63 100644 --- a/pkgs/tools/misc/plantuml/default.nix +++ b/pkgs/by-name/pl/plantuml/package.nix @@ -1,18 +1,20 @@ -{ lib -, stdenvNoCC -, fetchurl -, makeBinaryWrapper -, jre -, graphviz +{ + lib, + stdenvNoCC, + fetchurl, + graphviz, + jre, + makeBinaryWrapper, + testers, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "plantuml"; - version = "1.2024.5"; + version = "1.2024.7"; src = fetchurl { url = "https://github.com/plantuml/plantuml/releases/download/v${finalAttrs.version}/plantuml-pdf-${finalAttrs.version}.jar"; - hash = "sha256-YayIedHIIpecVF7BZSvBTp66Eb7He+l+1RCir5KuL28="; + hash = "sha256-8BlAPc2BeojyTcZVboUA6+sOA5AO5eG871mSIWinm5E="; }; nativeBuildInputs = [ @@ -30,18 +32,28 @@ stdenvNoCC.mkDerivation (finalAttrs: { ''; doInstallCheck = true; + postCheckInstall = '' $out/bin/plantuml -help $out/bin/plantuml -testdot ''; + passthru.tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + command = "plantuml --version"; + }; + meta = { description = "Draw UML diagrams using a simple and human readable text description"; homepage = "https://plantuml.com/"; # "plantuml -license" says GPLv3 or later license = lib.licenses.gpl3Plus; mainProgram = "plantuml"; - maintainers = with lib.maintainers; [ bjornfor Mogria ]; + maintainers = with lib.maintainers; [ + bjornfor + Mogria + anthonyroussel + ]; platforms = lib.platforms.unix; sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f7bd5bedd49e..35dedbb42f7e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11317,12 +11317,6 @@ with pkgs; pk2cmd = callPackage ../tools/misc/pk2cmd { }; - plantuml = callPackage ../tools/misc/plantuml { }; - - plantuml-c4 = callPackage ../tools/misc/plantuml/plantuml-c4.nix { }; - - plantuml-server = callPackage ../tools/misc/plantuml-server { }; - plan9port = darwin.apple_sdk_11_0.callPackage ../tools/system/plan9port { inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa IOKit Metal QuartzCore; inherit (darwin) DarwinTools;