16 repoBase = "https://github.com/RPTools/maptool";
18 url = "${repoBase}/releases/download/${version}/maptool-${version}-x86_64.pkg.tar.zst";
19 hash = "sha256-KjP6zugQw9r1hvdxqOgTrt4hYMYg+lgjkgkj3tfb38s=";
23 description = "Virtual Tabletop for playing roleplaying games with remote players or face to face";
24 mainProgram = "maptool";
25 homepage = "https://www.rptools.net/toolbox/maptool/";
26 sourceProvenance = with sourceTypes; [
30 license = licenses.agpl3Plus;
31 maintainers = with maintainers; [ rhendric ];
32 platforms = [ "x86_64-linux" ];
35 javafxModules = [ "base" "controls" "media" "swing" "web" "fxml" "graphics" ];
37 appClasspath = "share/${pname}";
41 "${openjfx}/modules_src/javafx.${mod}/module-info.java"
42 "${openjfx}/modules/javafx.${mod}"
43 "${openjfx}/modules_libs/javafx.${mod}"
45 [ "$out/${appClasspath}/*" ];
48 "-cp" (lib.concatStringsSep ":" classpath)
50 "-Dsun.java2d.d3d=false"
51 "-Dfile.encoding=UTF-8"
52 "-Dpolyglot.engine.WarnInterpreterOnly=false"
53 "-XX:+ShowCodeDetailsInExceptionMessages"
54 "--add-opens=java.desktop/java.awt=ALL-UNNAMED"
55 "--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED"
56 "--add-opens=java.desktop/sun.awt.geom=ALL-UNNAMED"
57 "--add-opens=java.base/java.util=ALL-UNNAMED"
58 "--add-opens=javafx.web/javafx.scene.web=ALL-UNNAMED"
59 "--add-opens=javafx.web/com.sun.webkit=ALL-UNNAMED"
60 "--add-opens=javafx.web/com.sun.webkit.dom=ALL-UNNAMED"
61 "--add-opens=java.desktop/javax.swing=ALL-UNNAMED"
62 "--add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED"
63 "--add-opens=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED"
65 # disable telemetry (the empty DSN disables the Sentry library, setting the
66 # environment to Development disables some logic inside MapTool)
68 "-Dsentry.environment=Development"
72 rdnsName = "net.rptools.maptool";
74 stdenvNoCC.mkDerivation {
75 inherit pname version src meta;
91 desktopName = "MapTool";
94 comment = meta.description;
95 categories = [ "Game" ];
102 dest=$out/${appClasspath}
103 install -dm755 "$dest"
104 bsdtar -xf "$src" -C "$dest" --strip-components 4 opt/maptool/lib/app/{'*.jar',readme}
106 dest=$out/share/icons/hicolor/256x256/apps
107 install -dm755 "$dest"
108 bsdtar -xOf "$src" opt/maptool/lib/MapTool.png > "$dest"/${rdnsName}.png
111 install -dm755 "$dest"
112 makeWrapper ${jre}/bin/java "$dest"/${binName} \
113 "''${gappsWrapperArgs[@]}" \
114 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ ffmpeg ]} \
115 --add-flags "${lib.concatStringsSep " " jvmArgs} net.rptools.maptool.client.LaunchInstructions"
120 passthru.updateScript = gitUpdater {
121 url = "${repoBase}.git";
122 ignoredVersions = "-";