2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchzip, jre, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
pname = "VASSAL";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "3.5.8";
|
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";
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-IJ3p7+0fs/2dCbE1BOb2580upR9W/1R2/e3xmkAsJ+M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# 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; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A free, open-source boardgame engine";
|
|
|
|
homepage = "http://www.vassalengine.org/";
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|