about summary refs log tree commit diff
path: root/pkgs/applications/office/jabref
diff options
context:
space:
mode:
authorlinsui <linsui@inbox.lv>2023-07-10 01:56:54 +0800
committerlinsui <linsui555@gmail.com>2023-07-24 14:10:59 +0800
commite1ebc51ef647d5d54f0ae002fd13edea0ae3ae94 (patch)
tree04c898be47e4802ae71126260f0181e51320a660 /pkgs/applications/office/jabref
parent057d63a7970f7bee9590013c63864b0cafcfa40c (diff)
jabref: fix gapps wrapper
Diffstat (limited to 'pkgs/applications/office/jabref')
-rw-r--r--pkgs/applications/office/jabref/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/applications/office/jabref/default.nix b/pkgs/applications/office/jabref/default.nix
index 786fa2f4623f5..d218d7351b27f 100644
--- a/pkgs/applications/office/jabref/default.nix
+++ b/pkgs/applications/office/jabref/default.nix
@@ -38,12 +38,12 @@ stdenv.mkDerivation rec {
   desktopItems = [
     (makeDesktopItem {
       comment = meta.description;
-      name = "JabRef %U";
+      name = "JabRef";
       desktopName = "JabRef";
       genericName = "Bibliography manager";
       categories = [ "Office" ];
       icon = "jabref";
-      exec = "JabRef";
+      exec = "JabRef %U";
       startupWMClass = "org.jabref.gui.JabRefMain";
       mimeTypes = [ "text/x-bibtex" ];
     })
@@ -144,8 +144,14 @@ stdenv.mkDerivation rec {
     unzip $out/lib/javafx-web-*.jar libjfxwebkit.so -d $out/lib/
 
     DEFAULT_JVM_OPTS=$(sed -n -E "s/^DEFAULT_JVM_OPTS='(.*)'$/\1/p" $out/bin/JabRef | sed -e "s|\$APP_HOME|$out|g" -e 's/"//g')
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
     rm $out/bin/*
 
+    # put this in postFixup because some gappsWrapperArgs are generated in gappsWrapperArgsHook in preFixup
     makeWrapper ${jdk}/bin/java $out/bin/JabRef \
       "''${gappsWrapperArgs[@]}" \
       --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
@@ -154,8 +160,6 @@ stdenv.mkDerivation rec {
 
     # lowercase alias (for convenience and required for browser extensions)
     ln -sf $out/bin/JabRef $out/bin/jabref
-
-    runHook postInstall
   '';
 
   meta = with lib; {