2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchzip
|
|
|
|
, glib
|
|
|
|
, jre
|
|
|
|
, makeWrapper
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
pname = "VASSAL";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "3.7.14";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/vassalengine/vassal/releases/download/${version}/${pname}-${version}-linux.tar.bz2";
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-3P3f6X2c5lF1AizEs9z59MhLy0Ntg203rkPAkv+SBtw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2023-02-09 11:40:11 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-20 05:27:41 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin $out/share/vassal $out/doc
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
cp CHANGES LICENSE README.md $out
|
2020-04-24 23:36:52 +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-20 05:27:41 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Don't move doc to share/, VASSAL expects it to be in the root
|
|
|
|
forceShare = [ "man" "info" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Free, open-source boardgame engine";
|
2022-02-20 05:27:41 +00:00
|
|
|
homepage = "https://vassalengine.org/";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2021-01-15 22:18:51 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ tvestelind ];
|
2021-03-15 08:37:03 +00:00
|
|
|
platforms = platforms.unix;
|
2023-02-09 11:40:11 +00:00
|
|
|
mainProgram = "vassal";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|