diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/applications/editors/jetbrains/linux.nix | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/applications/editors/jetbrains/linux.nix')
-rw-r--r-- | pkgs/applications/editors/jetbrains/linux.nix | 26 |
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 |