jetbrains: fix remote dev server for IDEs
Adds the necessary patch to fix the remote dev server in the Jetbrains IDEs ( see #153335 ).
This commit is contained in:
parent
fe3b9fd75f
commit
4d0d2601a6
2 changed files with 26 additions and 2 deletions
17
pkgs/applications/editors/jetbrains/JetbrainsRemoteDev.patch
Normal file
17
pkgs/applications/editors/jetbrains/JetbrainsRemoteDev.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- a/plugins/remote-dev-server/bin/launcher.sh
|
||||
+++ b/plugins/remote-dev-server/bin/launcher.sh
|
||||
@@ -327,6 +327,8 @@
|
||||
REMOTE_DEV_SERVER_USE_SELF_CONTAINED_LIBS=1
|
||||
fi
|
||||
|
||||
+REMOTE_DEV_SERVER_USE_SELF_CONTAINED_LIBS=0
|
||||
+
|
||||
if [ $REMOTE_DEV_SERVER_USE_SELF_CONTAINED_LIBS -eq 1 ]; then
|
||||
SELFCONTAINED_LIBS="$REMOTE_DEV_SERVER_DIR/selfcontained/lib"
|
||||
if [ ! -d "$SELFCONTAINED_LIBS" ]; then
|
||||
@@ -568,3 +570,5 @@
|
||||
"$LAUNCHER" "$STARTER_COMMAND" "$PROJECT_PATH" "$@"
|
||||
;;
|
||||
esac
|
||||
+
|
||||
+unset REMOTE_DEV_SERVER_USE_SELF_CONTAINED_LIBS
|
|
@ -84,6 +84,10 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
|||
patchelf --set-interpreter "$interpreter" bin/fsnotifier
|
||||
munge_size_hack bin/fsnotifier $target_size
|
||||
fi
|
||||
|
||||
if [ -d "plugins/remote-dev-server" ]; then
|
||||
patch -p1 < ${./JetbrainsRemoteDev.patch}
|
||||
fi
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -99,7 +103,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
|||
jdk=${jdk.home}
|
||||
item=${desktopItem}
|
||||
|
||||
makeWrapper "$out/$pname/bin/${loName}.sh" "$out/bin/${pname}" \
|
||||
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
|
||||
|
@ -114,11 +118,14 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
|||
--set ${hiName}_JDK "$jdk" \
|
||||
--set ${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
|
||||
chmod +x $out/$pname/bin/remote-dev-server-wrapped.sh
|
||||
ln -s "$out/$pname/bin/remote-dev-server-wrapped.sh" $out/bin/$pname-remote-dev-server
|
||||
ln -s "$item/share/applications" $out/share
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
} // lib.optionalAttrs (!(meta.license.free or true)) {
|
||||
preferLocalBuild = true;
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue