depot/third_party/nixpkgs/pkgs/games/vassal/default.nix
Default email 673ac0291b Project import generated by Copybara.
GitOrigin-RevId: 1f77a4c8c74bbe896053994836790aa9bf6dc5ba
2021-03-16 10:55:35 +01:00

36 lines
1 KiB
Nix

{ lib, stdenv, fetchzip, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "VASSAL";
version = "3.5.3";
src = fetchzip {
url = "https://github.com/vassalengine/vassal/releases/download/${version}/${pname}-${version}-linux.tar.bz2";
sha256 = "sha256-r48k4Un623uYsYcdF5UAH6w/uIdgWz8WQ75BiwrApkA=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin $out/share/vassal $out/doc
cp CHANGES LICENSE README.md $out
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" ];
meta = with lib; {
description = "A free, open-source boardgame engine";
homepage = "http://www.vassalengine.org/";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ tvestelind ];
platforms = platforms.unix;
};
}