2023-10-08 07:31:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-03-23 16:55:30 +00:00
|
|
|
, fetchurl
|
|
|
|
, jdk8
|
|
|
|
, unzip
|
|
|
|
}:
|
|
|
|
|
2023-10-08 07:31:31 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-10-08 07:31:39 +00:00
|
|
|
pname = "xmage";
|
2023-10-08 07:30:34 +00:00
|
|
|
version = "1.4.50V2";
|
2020-03-23 16:55:30 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-08 07:31:39 +00:00
|
|
|
url =
|
|
|
|
"https://github.com/magefree/mage/releases/download/xmage_${finalAttrs.version}/xmage_${finalAttrs.version}.zip";
|
2023-10-08 07:30:34 +00:00
|
|
|
sha256 = "sha256-t1peHYwCRy3wiIIwOD3nUyoxSOxbw6B/g++A1ofIbmg=";
|
2020-03-23 16:55:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${unzip}/bin/unzip $src
|
|
|
|
'';
|
|
|
|
|
2023-10-08 07:34:00 +00:00
|
|
|
installPhase = let
|
|
|
|
strVersion = lib.substring 0 6 finalAttrs.version;
|
|
|
|
in ''
|
2020-03-23 16:55:30 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -rv ./* $out
|
|
|
|
|
|
|
|
cat << EOS > $out/bin/xmage
|
2023-10-08 07:34:00 +00:00
|
|
|
exec ${jdk8}/bin/java -Xms256m -Xmx512m -XX:MaxPermSize=384m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -jar $out/mage-client/lib/mage-client-${strVersion}.jar
|
2023-10-08 07:31:39 +00:00
|
|
|
EOS
|
2020-03-23 16:55:30 +00:00
|
|
|
|
|
|
|
chmod +x $out/bin/xmage
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-23 16:55:30 +00:00
|
|
|
description = "Magic Another Game Engine";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2020-03-23 16:55:30 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ matthiasbeyer ];
|
|
|
|
homepage = "http://xmage.de/";
|
|
|
|
};
|
|
|
|
|
2023-10-08 07:31:31 +00:00
|
|
|
})
|
2020-03-23 16:55:30 +00:00
|
|
|
|