summary refs log tree commit diff
path: root/pkgs/applications/editors/jetbrains/linux.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/jetbrains/linux.nix')
-rw-r--r--pkgs/applications/editors/jetbrains/linux.nix26
1 files changed, 19 insertions, 7 deletions
diff --git a/pkgs/applications/editors/jetbrains/linux.nix b/pkgs/applications/editors/jetbrains/linux.nix
index efc939d0324..4a89ae20285 100644
--- a/pkgs/applications/editors/jetbrains/linux.nix
+++ b/pkgs/applications/editors/jetbrains/linux.nix
@@ -11,6 +11,7 @@
 , unzip
 , libsecret
 , libnotify
+, udev
 , e2fsprogs
 , python3
 , vmopts ? null
@@ -88,6 +89,21 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
     if [ -d "plugins/remote-dev-server" ]; then
       patch -p1 < ${./JetbrainsRemoteDev.patch}
     fi
+
+    vmopts_file=bin/linux/${vmoptsName}
+    if [[ ! -f $vmopts_file ]]; then
+      vmopts_file=bin/${vmoptsName}
+      if [[ ! -f $vmopts_file ]]; then
+        echo "ERROR: $vmopts_file not found"
+        exit 1
+      fi
+    fi
+    echo -Djna.library.path=${lib.makeLibraryPath ([
+      libsecret e2fsprogs libnotify
+      # Required for Help -> Collect Logs
+      # in at least rider and goland
+      udev
+    ])} >> $vmopts_file
   '';
 
   installPhase = ''
@@ -105,18 +121,14 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
 
     wrapProgram  "$out/$pname/bin/${loName}.sh" \
       --prefix PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git python3 ]}" \
-      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
-        # Some internals want libstdc++.so.6
-        stdenv.cc.cc.lib libsecret e2fsprogs
-        libnotify
-      ] ++ extraLdPath)}" \
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath extraLdPath}" \
       ${lib.concatStringsSep " " extraWrapperArgs} \
       --set-default JDK_HOME "$jdk" \
       --set-default ANDROID_JAVA_HOME "$jdk" \
       --set-default JAVA_HOME "$jdk" \
       --set-default JETBRAINSCLIENT_JDK "$jdk" \
-      --set ${hiName}_JDK "$jdk" \
-      --set ${hiName}_VM_OPTIONS ${vmoptsFile}
+      --set-default ${hiName}_JDK "$jdk" \
+      --set-default ${hiName}_VM_OPTIONS ${vmoptsFile}
 
     ln -s "$out/$pname/bin/${loName}.sh" $out/bin/$pname
     echo -e '#!/usr/bin/env bash\n'"$out/$pname/bin/remote-dev-server.sh"' "$@"' > $out/$pname/bin/remote-dev-server-wrapped.sh