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