3 # jdk8 is needed for building, but the game runs on newer jres as well
7 , stripJavaArchivesHook
15 desktopItem = makeDesktopItem {
17 desktopName = "Domination";
21 editorDesktopItem = makeDesktopItem {
22 name = "domination-map-editor";
23 desktopName = "Domination Map Editor";
24 exec = "domination-map-editor";
28 in stdenv.mkDerivation {
32 # The .zip releases do not contain the build.xml file
34 url = "https://svn.code.sf.net/p/domination/code/Domination";
35 # There are no tags in the repository.
36 # Look for commits like "new version x.y.z info on website"
37 # or "website update for x.y.z".
39 hash = "sha256-wsLBHkQc1SW+PToyCXIek6qRrRga2nLLkM+5msrnsBo=";
64 # Remove unnecessary files and launchers (they'd need to be wrapped anyway)
72 mkdir -p $out/share/domination
73 cp -r build/game/* $out/share/domination/
75 # Reimplement the two launchers mentioned in Unix_shortcutSpec.xml with makeWrapper
76 makeWrapper ${jre}/bin/java $out/bin/domination \
77 --chdir "$out/share/domination" \
78 --add-flags "-jar $out/share/domination/Domination.jar"
79 makeWrapper ${jre}/bin/java $out/bin/domination-map-editor \
80 --chdir "$out/share/domination" \
81 --add-flags "-cp $out/share/domination/Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame"
83 install -Dm644 build/game/resources/icon.png $out/share/pixmaps/domination.png
88 # remove extra metadata files for jar files which break stripJavaArchivesHook
89 find $out/share/domination/lib -type f -name '._*.jar' -delete
93 domination-starts = nixosTests.domination;
97 homepage = "https://domination.sourceforge.net/";
98 downloadPage = "https://domination.sourceforge.net/download.shtml";
99 description = "Game that is a bit like the board game Risk or RisiKo";
101 Domination is a game that is a bit like the well known board game of Risk
102 or RisiKo. It has many game options and includes many maps.
103 It includes a map editor, a simple map format, multiplayer network play,
104 single player, hotseat, 5 user interfaces and many more features.
106 sourceProvenance = with sourceTypes; [
108 binaryBytecode # source bundles dependencies as jars
110 license = licenses.gpl3Plus;
111 mainProgram = "domination";
112 maintainers = with maintainers; [ fgaz ];
113 platforms = platforms.all;