rstudioWrapper: don't create dangling symlink on darwin

This commit is contained in:
TomaSajt 2025-03-10 19:44:20 +01:00
parent d95b40ed10
commit 508b581122
No known key found for this signature in database
GPG key ID: F011163C050122A1

View file

@ -1,4 +1,6 @@
{
lib,
stdenv,
runCommand,
R,
rstudio,
@ -54,7 +56,13 @@ runCommand (rstudio.name + "-wrapper")
''
else
''
ln -s ${rstudio}/share $out
${lib.optionalString stdenv.hostPlatform.isLinux ''
# symlink files from unwrapped rstudio so that the desktop file and the icons
# are also installed when using the wrapped version
# TODO: figure out how to handle darwin .app structures
ln -s ${rstudio}/share $out
''}
makeWrapper ${rstudio}/bin/rstudio $out/bin/rstudio \
--set R_PROFILE_USER $out/$fixLibsR
''