diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-10-15 18:05:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-15 18:05:33 -0500 |
commit | 04234bd6ea4e6fe00c251c3d2baed395109af355 (patch) | |
tree | 236efa5b81e82b6cd1f4f855e07741e40b0ba7cc /pkgs | |
parent | df009d423fdf3212b7c0c96ae47cc53388436186 (diff) | |
parent | fc21de97f86744ab101995a664370f188a6f58fa (diff) |
Merge pull request #259721 from matthiasbeyer/update-xmage
xmage: 1.4.42V6 -> 1.4.50V2
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/games/xmage/default.nix | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/games/xmage/default.nix b/pkgs/games/xmage/default.nix index 15a65efeb7bc0..b6aa8e22afd2a 100644 --- a/pkgs/games/xmage/default.nix +++ b/pkgs/games/xmage/default.nix @@ -1,16 +1,18 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , jdk8 , unzip }: -stdenv.mkDerivation rec { - pname = "xmage"; - version = "1.4.42V6"; +stdenv.mkDerivation (finalAttrs: { + pname = "xmage"; + version = "1.4.50V2"; src = fetchurl { - url = "https://github.com/magefree/mage/releases/download/xmage_1.4.42V6/xmage_${version}.zip"; - sha256 = "14s4885ldi0rplqmab5m775plsqmmm0m89j402caiqm2q9mzvkhd"; + url = + "https://github.com/magefree/mage/releases/download/xmage_${finalAttrs.version}/xmage_${finalAttrs.version}.zip"; + sha256 = "sha256-t1peHYwCRy3wiIIwOD3nUyoxSOxbw6B/g++A1ofIbmg="; }; preferLocalBuild = true; @@ -19,13 +21,15 @@ stdenv.mkDerivation rec { ${unzip}/bin/unzip $src ''; - installPhase = '' + installPhase = let + strVersion = lib.substring 0 6 finalAttrs.version; + in '' mkdir -p $out/bin cp -rv ./* $out cat << EOS > $out/bin/xmage -exec ${jdk8}/bin/java -Xms256m -Xmx512m -XX:MaxPermSize=384m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -jar $out/mage-client/lib/mage-client-1.4.42.jar -EOS + exec ${jdk8}/bin/java -Xms256m -Xmx512m -XX:MaxPermSize=384m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -jar $out/mage-client/lib/mage-client-${strVersion}.jar + EOS chmod +x $out/bin/xmage ''; @@ -38,5 +42,5 @@ EOS homepage = "http://xmage.de/"; }; -} +}) |