jetbrains.*: Don't remove shell scripts, they are invoked by JetBrains Gateway

This commit is contained in:
zlepper 2025-05-21 14:55:43 +02:00 committed by Masum Reza
parent 767dce3542
commit de09e1f75b

View file

@ -119,13 +119,17 @@ lib.makeOverridable mkDerivation (
jdk=${jdk.home} jdk=${jdk.home}
item=${desktopItem} item=${desktopItem}
launcher="$out/$pname/bin/${loName}" needsWrapping=()
if [ -e "$launcher" ]; then
rm "$launcher".sh # We do not wrap the old script-style launcher anymore. if [ -f "$out/$pname/bin/${loName}" ]; then
else needsWrapping+=("$out/$pname/bin/${loName}")
launcher+=.sh fi
if [ -f "$out/$pname/bin/${loName}.sh" ]; then
needsWrapping+=("$out/$pname/bin/${loName}.sh")
fi fi
for launcher in "''${needsWrapping[@]}"
do
wrapProgram "$launcher" \ wrapProgram "$launcher" \
--prefix PATH : "${ --prefix PATH : "${
lib.makeBinPath [ lib.makeBinPath [
@ -146,6 +150,12 @@ lib.makeOverridable mkDerivation (
--set-default ${hiName}_JDK "$jdk" \ --set-default ${hiName}_JDK "$jdk" \
--set-default LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" \ --set-default LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" \
--set-default ${vmoptsIDE}_VM_OPTIONS ${vmoptsFile} --set-default ${vmoptsIDE}_VM_OPTIONS ${vmoptsFile}
done
launcher="$out/$pname/bin/${loName}"
if [ ! -e "$launcher" ]; then
launcher+=.sh
fi
ln -s "$launcher" $out/bin/$pname ln -s "$launcher" $out/bin/$pname
rm -rf $out/$pname/plugins/remote-dev-server/selfcontained/ rm -rf $out/$pname/plugins/remote-dev-server/selfcontained/