anchor.diff:      popd
     '';
   
  -  preBuild = ''
  -    export GRADLE_USER_HOME=$(mktemp -d)
  -  '';
  -
     # The default one still uses jdk8 (#89731)
     gradle_6 = (gradleGen.override (old: { java = jdk; })).gradle_6_7;
   
  
positive.code:     mkdir -p $out/bin
      makeWrapper ${jdk}/bin/java $out/bin/mindustry-server \
        --add-flags "-jar $out/share/mindustry-server.jar"
    '';
  
    meta = with lib; {
  
negative.code:     gradle_6
      makeWrapper
      jdk
    ] ++ lib.optionals enableClient [
      ant
      copyDesktopItems
    ];
  
    desktopItems = lib.optional enableClient desktopItem;
  
    buildPhase = with lib; ''
      export GRADLE_USER_HOME=$(mktemp -d)
  
      # point to offline repo
      sed -ie "s#mavenLocal()#mavenLocal(); maven { url '${deps}' }#g" Mindustry/build.gradle
      sed -ie "s#mavenCentral()#mavenCentral(); maven { url '${deps}' }#g" Arc/build.gradle
  