summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/rstudio
diff options
context:
space:
mode:
authorLaverne Schrock <laverne@schrock.email>2016-11-21 18:03:16 -0600
committerLaverne Schrock <laverne@schrock.email>2016-12-22 08:15:56 -0600
commit4154adb128c5bc1e7c44fa4a38230f1d6d110b0e (patch)
treebaf3a0606d01b3d1d4ca31ac4eaefb70e25b9543 /pkgs/applications/editors/rstudio
parent322f5e51320086c7b99adde3e1a2c382bddb127b (diff)
rstudio: add desktop file
Fixes #20230
Diffstat (limited to 'pkgs/applications/editors/rstudio')
-rw-r--r--pkgs/applications/editors/rstudio/default.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix
index 0749f58ecea2..244b3b67045b 100644
--- a/pkgs/applications/editors/rstudio/default.nix
+++ b/pkgs/applications/editors/rstudio/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, boost155, zlib, openssl, R, qt4, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper }:
+{ stdenv, fetchurl, makeDesktopItem, cmake, boost155, zlib, openssl, R, qt4, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper }:
let
version = "0.98.110";
@@ -61,8 +61,23 @@ stdenv.mkDerivation {
cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" ];
+ desktopItem = makeDesktopItem {
+ name = name;
+ exec = "rstudio %F";
+ icon = "rstudio";
+ desktopName = "RStudio";
+ genericName = "IDE";
+ comment = meta.description;
+ categories = "Development;";
+ mimeType = "text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;text/x-r-presentation;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;";
+ };
+
postInstall = ''
wrapProgram $out/bin/rstudio --suffix PATH : ${gnumake}/bin
+ mkdir $out/share
+ cp -r ${desktopItem}/share/applications $out/share
+ mkdir $out/share/icons
+ ln $out/rstudio.png $out/share/icons
'';
meta = with stdenv.lib;