anchor.diff:        maven
       ];
   
  -    buildPhase = "mvn package -Dmaven.repo.local=$out/.m2";
  +    buildPhase = "mvn package -Dmaven.repo.local=$out/.m2 -P desktop,all-platforms";
   
       # keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
       installPhase = ''
  
positive.code: 
        mkdir -p $out/share/pixmaps
        ln -s $out/dbeaver/icon.xpm $out/share/pixmaps/dbeaver.xpm
      '';
  
    meta = with lib; {
  
negative.code:   ];
  
    buildPhase = ''
      runHook preBuild
  
      mvn package --offline -Dmaven.repo.local=$(cp -dpR ${fetchedMavenDeps}/.m2 ./ && chmod +w -R .m2 && pwd)/.m2 -P desktop,all-platforms
  
      runHook postBuild
    '';
  
    installPhase =
      let
        productTargetPath = "product/standalone/target/products/org.jkiss.dbeaver.core.product";
  
        platformMap = {
          aarch64-linux = "aarch64";
          x86_64-darwin = "x86_64";
          x86_64-linux  = "x86_64";
        };
  
        systemPlatform = platformMap.${stdenv.hostPlatform.system} or (throw "dbeaver not supported on ${stdenv.hostPlatform.system}");
      in
      if stdenv.isDarwin then ''
        runHook preInstall
  
        mkdir -p $out/Applications $out/bin
        cp -r ${productTargetPath}/macosx/cocoa/${systemPlatform}/DBeaver.app $out/Applications
  
        sed -i "/^-vm/d; /bin\/java/d" $out/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini
  
  