rstudio: add desktop file

Fixes #20230
This commit is contained in:
Laverne Schrock 2016-11-21 18:03:16 -06:00
parent 322f5e5132
commit 4154adb128

View file

@ -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;