Skip to content

Commit 508b581

Browse files
committed
rstudioWrapper: don't create dangling symlink on darwin
1 parent d95b40e commit 508b581

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkgs/development/r-modules/wrapper-rstudio.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
lib,
3+
stdenv,
24
runCommand,
35
R,
46
rstudio,
@@ -54,7 +56,13 @@ runCommand (rstudio.name + "-wrapper")
5456
''
5557
else
5658
''
57-
ln -s ${rstudio}/share $out
59+
${lib.optionalString stdenv.hostPlatform.isLinux ''
60+
# symlink files from unwrapped rstudio so that the desktop file and the icons
61+
# are also installed when using the wrapped version
62+
# TODO: figure out how to handle darwin .app structures
63+
ln -s ${rstudio}/share $out
64+
''}
65+
5866
makeWrapper ${rstudio}/bin/rstudio $out/bin/rstudio \
5967
--set R_PROFILE_USER $out/$fixLibsR
6068
''

0 commit comments

Comments
 (0)