anchor.diff:      tar xf build/distributions/JabRef-${version}.tar -C $out --strip-components=1
       unzip $out/lib/javafx-web-18-linux${lib.optionalString stdenv.isAarch64 "-aarch64"}.jar libjfxwebkit.so -d $out/lib/
   
  -    wrapProgram $out/bin/JabRef \
  -      --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
  -      --set JAVA_HOME "${jdk}" \
  -      --set JAVA_OPTS "-Djava.library.path=$out/lib/ --patch-module org.jabref=$out/share/java/jabref/resources/main"
  -
       # lowercase alias (for convenience and required for browser extensions)
       ln -sf $out/bin/JabRef $out/bin/jabref
   
  +    rm $out/bin/JabRef.bat
  +
       runHook postInstall
  +  '';
  +
  +  preFixup = ''
  +    gappsWrapperArgs+=(
  +      --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
  +      --set JAVA_HOME "${jdk}"
  +      --set JAVA_OPTS "-Djava.library.path=$out/lib/ --patch-module org.jabref=$out/share/java/jabref/resources/main"
  +    )
     '';
   
     meta = with lib; {
  
positive.code:   nativeBuildInputs = [
      jdk
      gradle
      makeWrapper
      copyDesktopItems
      unzip
    ];
  
    buildPhase = ''
      runHook preBuild
  
negative.code: { lib
  , stdenv
  , fetchFromGitHub
  , wrapGAppsHook
  , makeDesktopItem
  , copyDesktopItems
  , unzip
  , xdg-utils
  , gtk3
  , jdk
  , gradle
  , perl
  