anchor.diff:      gradle --offline --no-daemon server:dist -Pbuildversion=${buildVersion}
     '';
   
  -  installPhase = with stdenv.lib; optionalString enableClient ''
  +  installPhase = with lib; ''
  +    runHook preInstall
  +  '' + optionalString enableClient ''
       install -Dm644 desktop/build/libs/Mindustry.jar $out/share/mindustry.jar
       mkdir -p $out/bin
       makeWrapper ${jdk}/bin/java $out/bin/mindustry \
  
positive.code:     # Here we download dependencies for 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.
      buildPhase = preBuild + ''
        pushd Mindustry
        gradle --no-daemon resolveDependencies
        popd
      '';
  
negative.code:     popd
    '';
  
    # The default one still uses jdk8 (#89731)
    gradle_6 = (gradleGen.override (old: { java = jdk; })).gradle_6_7;
  
  