vassal: add desktop entry (#418154)

authored by Peder Bergebakken Sundt and committed by GitHub 1189c23f b808c31e

+26 -1
+26 -1
pkgs/by-name/va/vassal/package.nix
··· 6 6 jre, 7 7 makeWrapper, 8 8 wrapGAppsHook3, 9 + makeDesktopItem, 10 + copyDesktopItems, 11 + versionCheckHook, 9 12 }: 10 13 11 14 stdenv.mkDerivation rec { ··· 24 27 nativeBuildInputs = [ 25 28 makeWrapper 26 29 wrapGAppsHook3 30 + copyDesktopItems 27 31 ]; 28 32 29 33 installPhase = '' ··· 39 43 --add-flags "-Duser.dir=$out -cp $out/share/vassal/Vengine.jar \ 40 44 VASSAL.launch.ModuleManager" 41 45 46 + install -Dm444 -t "$out/share/icons/hicolor/scalable/apps/" VASSAL.svg 47 + 42 48 runHook postInstall 43 49 ''; 44 50 51 + desktopItems = [ 52 + (makeDesktopItem { 53 + name = "VASSAL"; 54 + exec = "vassal"; 55 + icon = "VASSAL"; 56 + desktopName = "VASSAL"; 57 + comment = "The open-source boardgame engine"; 58 + categories = [ "Game" ]; 59 + startupWMClass = "VASSAL-launch-ModuleManager"; 60 + }) 61 + ]; 62 + 45 63 # Don't move doc to share/, VASSAL expects it to be in the root 46 64 forceShare = [ 47 65 "man" 48 66 "info" 49 67 ]; 50 68 69 + nativeInstallCheckInputs = [ 70 + versionCheckHook 71 + ]; 72 + doInstallCheck = true; 73 + versionCheckProgram = "${placeholder "out"}/bin/vassal"; 74 + versionCheckProgramArg = "--version"; 75 + 51 76 meta = with lib; { 52 77 description = "Free, open-source boardgame engine"; 53 78 homepage = "https://vassalengine.org/"; 54 79 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 55 80 license = licenses.lgpl21Only; 56 81 maintainers = with maintainers; [ tvestelind ]; 57 - platforms = platforms.unix; 82 + platforms = with lib.platforms; unix ++ windows; 58 83 mainProgram = "vassal"; 59 84 }; 60 85 }