Merge pull request #243533 from tymscar/jetbrains-remote-dev-server

This commit is contained in:
Sandro 2023-07-19 14:14:34 +02:00 committed by GitHub
commit f29de8b52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 9 deletions

View file

@ -17038,6 +17038,12 @@
matrix = "@ty:tjll.net"; matrix = "@ty:tjll.net";
name = "Tyler Langlois"; name = "Tyler Langlois";
}; };
tymscar = {
email = "oscar@tymscar.com";
github = "tymscar";
githubId = 3742502;
name = "Oscar Molnar";
};
typetetris = { typetetris = {
email = "ericwolf42@mail.com"; email = "ericwolf42@mail.com";
github = "typetetris"; github = "typetetris";

View 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

View file

@ -46,7 +46,7 @@ let
Enhancing productivity for every C and C++ Enhancing productivity for every C and C++
developer on Linux, macOS and Windows. developer on Linux, macOS and Windows.
''; '';
maintainers = with maintainers; [ edwtjo mic92 ]; maintainers = with maintainers; [ edwtjo mic92 tymscar ];
}; };
}).overrideAttrs (attrs: { }).overrideAttrs (attrs: {
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [ nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
@ -141,7 +141,7 @@ let
The new IDE extends the IntelliJ platform with the coding assistance The new IDE extends the IntelliJ platform with the coding assistance
and tool integrations specific for the Go language and tool integrations specific for the Go language
''; '';
maintainers = [ ]; maintainers = with maintainers; [ tymscar ];
}; };
}).overrideAttrs (attrs: { }).overrideAttrs (attrs: {
postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux '' postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
@ -172,7 +172,7 @@ let
with JUnit, TestNG, popular SCMs, Ant & Maven. Also known with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
as IntelliJ. as IntelliJ.
''; '';
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot AnatolyPopov ]; maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot AnatolyPopov tymscar ];
platforms = ideaPlatforms; platforms = ideaPlatforms;
}; };
}); });
@ -207,7 +207,7 @@ let
with on-the-fly code analysis, error prevention and with on-the-fly code analysis, error prevention and
automated refactorings for PHP and JavaScript code. automated refactorings for PHP and JavaScript code.
''; '';
maintainers = with maintainers; [ dritter ]; maintainers = with maintainers; [ dritter tymscar ];
}; };
}); });
@ -232,7 +232,7 @@ let
providing you almost everything you need for your comfortable providing you almost everything you need for your comfortable
and productive development! and productive development!
''; '';
maintainers = with maintainers; [ genericnerdyusername ]; maintainers = with maintainers; [ genericnerdyusername tymscar ];
}; };
}).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs cythonSpeedup { }).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs cythonSpeedup {
buildInputs = with python3.pkgs; [ python3 setuptools ]; buildInputs = with python3.pkgs; [ python3 setuptools ];
@ -286,7 +286,7 @@ let
homepage = "https://www.jetbrains.com/ruby/"; homepage = "https://www.jetbrains.com/ruby/";
inherit description license platforms; inherit description license platforms;
longDescription = description; longDescription = description;
maintainers = with maintainers; [ edwtjo ]; maintainers = with maintainers; [ edwtjo tymscar ];
}; };
}); });
@ -302,7 +302,7 @@ let
and CSS with on-the-fly code analysis, error prevention and and CSS with on-the-fly code analysis, error prevention and
automated refactorings for JavaScript code. automated refactorings for JavaScript code.
''; '';
maintainers = with maintainers; [ abaldeau ]; maintainers = with maintainers; [ abaldeau tymscar ];
}; };
}); });

View file

@ -84,6 +84,10 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
patchelf --set-interpreter "$interpreter" bin/fsnotifier patchelf --set-interpreter "$interpreter" bin/fsnotifier
munge_size_hack bin/fsnotifier $target_size munge_size_hack bin/fsnotifier $target_size
fi fi
if [ -d "plugins/remote-dev-server" ]; then
patch -p1 < ${./JetbrainsRemoteDev.patch}
fi
''; '';
installPhase = '' installPhase = ''
@ -99,7 +103,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
jdk=${jdk.home} jdk=${jdk.home}
item=${desktopItem} 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 PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git python3 ]}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
# Some internals want libstdc++.so.6 # Some internals want libstdc++.so.6
@ -114,11 +118,14 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
--set ${hiName}_JDK "$jdk" \ --set ${hiName}_JDK "$jdk" \
--set ${hiName}_VM_OPTIONS ${vmoptsFile} --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 ln -s "$item/share/applications" $out/share
runHook postInstall runHook postInstall
''; '';
} // lib.optionalAttrs (!(meta.license.free or true)) { } // lib.optionalAttrs (!(meta.license.free or true)) {
preferLocalBuild = true; preferLocalBuild = true;
}) })