diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/games/mindustry/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/games/mindustry/default.nix | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/games/mindustry/default.nix b/infra/libkookie/nixpkgs/pkgs/games/mindustry/default.nix index c0c8663868d1..89ff37458af9 100644 --- a/infra/libkookie/nixpkgs/pkgs/games/mindustry/default.nix +++ b/infra/libkookie/nixpkgs/pkgs/games/mindustry/default.nix @@ -2,10 +2,11 @@ , makeWrapper , makeDesktopItem , fetchFromGitHub -, gradle_5 +, gradleGen +, jdk14 , perl , jre -, libpulseaudio +, alsaLib # Make the build version easily overridable. # Server and client build versions must match, and an empty build version means @@ -21,14 +22,14 @@ let # Note: when raising the version, ensure that all SNAPSHOT versions in # build.gradle are replaced by a fixed version # (the current one at the time of release) (see postPatch). - version = "104.6"; + version = "120.2"; buildVersion = makeBuildVersion version; src = fetchFromGitHub { owner = "Anuken"; repo = "Mindustry"; rev = "v${version}"; - sha256 = "1crdfiymaz57gnma6bmdcsnbl635nhjdndrjv467c4xfq9vvap2i"; + sha256 = "01a7qpwfr1n540fk0k65kl03biix0gmg66z7qn22mb2703laq1xc"; }; desktopItem = makeDesktopItem { @@ -49,11 +50,14 @@ let sed -i 's/com.github.anuken:packr:-SNAPSHOT/com.github.anuken:packr:034efe51781d2d8faa90370492133241bfb0283c/' build.gradle ''; + # The default one still uses jdk8 (#89731) + gradle_6 = (gradleGen.override (old: { java = jdk14; })).gradle_6_7; + # fake build to pre-download deps into fixed-output derivation deps = stdenv.mkDerivation { pname = "${pname}-deps"; inherit version src postPatch; - nativeBuildInputs = [ gradle_5 perl ]; + nativeBuildInputs = [ gradle_6 perl ]; # Here we build both the server and the client so we only have to specify # one hash for 'deps'. Deps can be garbage collected after the build, # so this is not really an issue. @@ -70,7 +74,7 @@ let ''; outputHashAlgo = "sha256"; outputHashMode = "recursive"; - outputHash = "08yrczz1qn78qy3x67gs7d0xvihbfbb8ggiczq2nj812745zcizw"; + outputHash = "1yv9l8zdml6drmvlgv45w3qas9qmb654x4kja3an4d16k020khr7"; }; # Separate commands for building and installing the server and the client @@ -84,7 +88,7 @@ let install -Dm644 desktop/build/libs/Mindustry.jar $out/share/mindustry.jar mkdir -p $out/bin makeWrapper ${jre}/bin/java $out/bin/mindustry \ - --prefix LD_LIBRARY_PATH : ${libpulseaudio}/lib \ + ${stdenv.lib.optionalString stdenv.isLinux "--prefix LD_LIBRARY_PATH : ${alsaLib}/lib"} \ --add-flags "-jar $out/share/mindustry.jar" install -Dm644 core/assets/icons/icon_64.png $out/share/icons/hicolor/64x64/apps/mindustry.png install -Dm644 ${desktopItem}/share/applications/Mindustry.desktop $out/share/applications/Mindustry.desktop @@ -102,7 +106,7 @@ assert stdenv.lib.assertMsg (enableClient || enableServer) stdenv.mkDerivation rec { inherit pname version src postPatch; - nativeBuildInputs = [ gradle_5 makeWrapper ]; + nativeBuildInputs = [ gradle_6 makeWrapper ]; buildPhase = with stdenv.lib; '' export GRADLE_USER_HOME=$(mktemp -d) @@ -124,6 +128,8 @@ stdenv.mkDerivation rec { license = licenses.gpl3; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; + # Hash mismatch on darwin: + # https://github.com/NixOS/nixpkgs/pull/105590#issuecomment-737120293 + broken = stdenv.isDarwin; }; } - |