2023-01-25 11:28:48 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchzip
|
|
|
|
, glib
|
|
|
|
, jre
|
|
|
|
, makeWrapper
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2016-01-23 01:42:51 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-29 18:32:16 +00:00
|
|
|
pname = "VASSAL";
|
2023-05-24 06:25:56 +00:00
|
|
|
version = "3.6.19";
|
2016-01-23 01:42:51 +00:00
|
|
|
|
2020-12-29 18:32:16 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/vassalengine/vassal/releases/download/${version}/${pname}-${version}-linux.tar.bz2";
|
2023-05-24 06:25:56 +00:00
|
|
|
sha256 = "sha256-JqMX0RUx1Yndo1pkLA4YnijgkojBaelt6T7gP+CUBSI=";
|
2016-01-23 01:42:51 +00:00
|
|
|
};
|
|
|
|
|
2023-01-25 11:28:48 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
2016-01-23 01:42:51 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-17 00:50:21 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2016-01-23 01:42:51 +00:00
|
|
|
mkdir -p $out/bin $out/share/vassal $out/doc
|
|
|
|
|
2020-12-29 18:32:16 +00:00
|
|
|
cp CHANGES LICENSE README.md $out
|
2016-01-23 01:42:51 +00:00
|
|
|
cp -R lib/* $out/share/vassal
|
|
|
|
cp -R doc/* $out/doc
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/vassal \
|
|
|
|
--add-flags "-Duser.dir=$out -cp $out/share/vassal/Vengine.jar \
|
|
|
|
VASSAL.launch.ModuleManager"
|
2022-02-17 00:50:21 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2016-01-23 01:42:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Don't move doc to share/, VASSAL expects it to be in the root
|
|
|
|
forceShare = [ "man" "info" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-02-01 13:00:45 +00:00
|
|
|
description = "A free, open-source boardgame engine";
|
2022-02-17 00:50:21 +00:00
|
|
|
homepage = "https://vassalengine.org/";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2020-12-29 18:32:16 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2016-01-23 01:42:51 +00:00
|
|
|
maintainers = with maintainers; [ tvestelind ];
|
2021-03-12 05:21:42 +00:00
|
|
|
platforms = platforms.unix;
|
2023-01-25 11:28:27 +00:00
|
|
|
mainProgram = "vassal";
|
2016-01-23 01:42:51 +00:00
|
|
|
};
|
|
|
|
}
|