2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchzip, jre, makeWrapper }:
|
2016-01-23 02:42:51 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-29 19:32:16 +01:00
|
|
|
pname = "VASSAL";
|
2022-02-17 01:50:21 +01:00
|
|
|
version = "3.6.5";
|
2016-01-23 02:42:51 +01:00
|
|
|
|
2020-12-29 19:32:16 +01:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/vassalengine/vassal/releases/download/${version}/${pname}-${version}-linux.tar.bz2";
|
2022-02-17 01:50:21 +01:00
|
|
|
sha256 = "sha256-wnaT0+r599/RboeUfpCZTNd/M2kaCsckI9F+7r7leEE=";
|
2016-01-23 02:42:51 +01:00
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2016-01-23 02:42:51 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-17 01:50:21 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
2016-01-23 02:42:51 +01:00
|
|
|
mkdir -p $out/bin $out/share/vassal $out/doc
|
|
|
|
|
2020-12-29 19:32:16 +01:00
|
|
|
cp CHANGES LICENSE README.md $out
|
2016-01-23 02:42:51 +01: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 01:50:21 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2016-01-23 02:42:51 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Don't move doc to share/, VASSAL expects it to be in the root
|
|
|
|
forceShare = [ "man" "info" ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-02-01 14:00:45 +01:00
|
|
|
description = "A free, open-source boardgame engine";
|
2022-02-17 01:50:21 +01:00
|
|
|
homepage = "https://vassalengine.org/";
|
2020-12-29 19:32:16 +01:00
|
|
|
license = licenses.lgpl21Only;
|
2016-01-23 02:42:51 +01:00
|
|
|
maintainers = with maintainers; [ tvestelind ];
|
2021-03-12 06:21:42 +01:00
|
|
|
platforms = platforms.unix;
|
2016-01-23 02:42:51 +01:00
|
|
|
};
|
|
|
|
}
|