13 src = fetchFromGitHub {
16 rev = "forge-${version}";
17 hash = "sha256-pxnnqLfyblbIgIRZZrx8Y8K43zUv9mu7PzZ7zltpEUQ=";
20 # launch4j downloads and runs a native binary during the package phase.
21 patches = [ ./no-launch4j.patch ];
24 maven.buildMavenPackage {
26 inherit version src patches;
28 # Tests need a running Xorg.
29 mvnParameters = "-DskipTests";
30 mvnHash = "sha256-QK9g0tG75lIhEtf4jW03N32YbD9Fe5iI0JTuqmCTtnE=";
32 nativeBuildInputs = [ makeWrapper ];
36 mkdir -p $out/bin $out/share/forge
38 forge-gui-desktop/target/forge.sh \
39 forge-gui-desktop/target/forge-gui-desktop-${version}-jar-with-dependencies.jar \
40 forge-gui-mobile-dev/target/forge-adventure.sh \
41 forge-gui-mobile-dev/target/forge-gui-mobile-dev-${version}-jar-with-dependencies.jar \
42 forge-adventure/target/forge-adventure-editor.sh \
43 forge-adventure/target/forge-adventure-${version}-jar-with-dependencies.jar \
50 for commandToInstall in forge forge-adventure forge-adventure-editor; do
51 chmod 555 $out/share/forge/$commandToInstall.sh
52 makeWrapper $out/share/forge/$commandToInstall.sh $out/bin/$commandToInstall \
53 --prefix PATH : ${lib.makeBinPath [ coreutils openjdk gnused ]} \
54 --set JAVA_HOME ${openjdk}/lib/openjdk \
60 description = "Magic: the Gathering card game with rules enforcement";
61 homepage = "https://www.slightlymagic.net/forum/viewforum.php?f=26";
62 license = licenses.gpl3Plus;
63 maintainers = with maintainers; [ eigengrau ];