mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
jetbrains: Select best available launcher and wrap in all cases
This commit is contained in:
parent
d4f311a338
commit
5ed7d4c9a3
@ -104,7 +104,14 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
||||
jdk=${jdk.home}
|
||||
item=${desktopItem}
|
||||
|
||||
wrapProgram "$out/$pname/bin/${loName}.sh" \
|
||||
launcher="$out/$pname/bin/${loName}"
|
||||
if [ -e "$launcher" ]; then
|
||||
rm "$launcher".sh # We do not wrap the old script-style launcher anymore.
|
||||
else
|
||||
launcher+=.sh
|
||||
fi
|
||||
|
||||
wrapProgram "$launcher" \
|
||||
--prefix PATH : "${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
|
||||
--suffix PATH : "${lib.makeBinPath [ python3 ]}" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath extraLdPath}" \
|
||||
@ -117,7 +124,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
||||
--set-default LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" \
|
||||
--set-default ${vmoptsIDE}_VM_OPTIONS ${vmoptsFile}
|
||||
|
||||
ln -s "$out/$pname/bin/${loName}" $out/bin/$pname
|
||||
ln -s "$launcher" $out/bin/$pname
|
||||
rm -rf $out/$pname/plugins/remote-dev-server/selfcontained/
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user