git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #25338 from changlinli/upgrade-rstudio

RStudio: 0.98.110 -> 1.1.216

commit56a90b2fbf3ce9ea9f2ecb2a46429ca7c86564be authorMichael Raskin <7c6f434c@mail.ru> dateSun 30 Apr 2017, 12:17 (10 years ago) parent19629c4d6f602c
2 files changed+48−18
pkgs/applications/editors/rstudio/default.nix+41−12 pkgs/applications/editors/rstudio/r-location.patch+7−6
pkgs/applications/editors/rstudio/default.nix+41−12
@@ -1,5 +1,5 @@
1−{ stdenv, fetchurl, makeDesktopItem, cmake, boost155, zlib, openssl,
2−R, qt4, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper,
1+{ stdenv, fetchurl, makeDesktopItem, cmake, boost163, zlib, openssl,
2+R, qt5, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper, pandoc,
33# If you have set up an R wrapper with other packages by following
44# something like https://nixos.org/nixpkgs/manual/#r-packages, RStudio
55# by default not be able to access any of those R packages. In order
@@ -11,18 +11,18 @@ useRPackages ? false
1111}:
1212
1313let
14− version = "0.98.110";
14+ version = "1.1.216";
1515 ginVer = "1.5";
16− gwtVer = "2.5.1";
16+ gwtVer = "2.7.0";
1717in
1818stdenv.mkDerivation rec {
1919 name = "RStudio-${version}";
2020
21− buildInputs = [ cmake boost155 zlib openssl R qt4 libuuid unzip ant jdk makeWrapper ];
21+ buildInputs = [ cmake boost163 zlib openssl R qt5.full qt5.qtwebkit qt5.qmakeHook libuuid unzip ant jdk makeWrapper pandoc ];
2222
2323 src = fetchurl {
2424 url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz";
25− sha256 = "0wybbvl5libki8z2ywgcd0hg0py1az484r95lhwh3jbrwfx7ri2z";
25+ sha256 = "07lp2ybvj7ippdrp7fv7j54dp0mm6k19j1vqdvjdk95acg3xgcjf";
2626 };
2727
2828 # Hack RStudio to only use the input R.
@@ -38,14 +38,34 @@ stdenv.mkDerivation rec {
3838 inherit gwtVer;
3939 gwtSrc = fetchurl {
4040 url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip";
41− sha256 = "0fjr2rcr8lnywj54mzhg9i4xz1b6fh8yv12p5i2q5mgfld2xymy4";
41+ sha256 = "1cs78z9a1jg698j2n35wsy07cy4fxcia9gi00x0r0qc3fcdhcrda";
4242 };
4343
4444 hunspellDictionaries = builtins.attrValues hunspellDicts;
4545
4646 mathJaxSrc = fetchurl {
47− url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-20.zip;
48− sha256 = "1ikg3fhharsfrh2fv8c53fdawqajj24nif89400l3klw1hyq4zal";
47+ url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-26.zip;
48+ sha256 = "0wbcqb9rbfqqvvhqr1pbqax75wp8ydqdyhp91fbqfqp26xzjv6lk";
49+ };
50+
51+ rmarkdownSrc = fetchurl {
52+ url = "https://github.com/rstudio/rmarkdown/archive/95b8b1fa64f78ca99f225a67fff9817103be56.zip";
53+ sha256 = "12fa65qr04rwsprkmyl651mkaqcbn1znwsmcjg4qsk9n5nxg0fah";
54+ };
55+
56+ rsconnectSrc = fetchurl {
57+ url = "https://github.com/rstudio/rsconnect/archive/425f3767b3142bc6b81c9eb62c4722f1eedc9781.zip";
58+ sha256 = "1sgf9dj9wfk4c6n5p1jc45386pf0nj2alg2j9qx09av3can1dy9p";
59+ };
60+
61+ rstudiolibclang = fetchurl {
62+ url = https://s3.amazonaws.com/rstudio-buildtools/libclang-3.5.zip;
63+ sha256 = "1sl5vb8misipwbbbykdymw172w9qrh8xv3p29g0bf3nzbnv6zc7c";
64+ };
65+
66+ rstudiolibclangheaders = fetchurl {
67+ url = https://s3.amazonaws.com/rstudio-buildtools/libclang-builtin-headers.zip;
68+ sha256 = "0x4ax186bm3kf098izwmsplckgx1kqzg9iiyzg95rpbqsb4593qb";
4969 };
5070
5171 preConfigure =
@@ -66,10 +86,19 @@ stdenv.mkDerivation rec {
6686 done
6787 done
6888
69− unzip $mathJaxSrc -d dependencies/common/mathjax
89+ unzip $mathJaxSrc -d dependencies/common/mathjax-26
90+ unzip $rmarkdownSrc -d dependencies/common/rmarkdown
91+ unzip $rsconnectSrc -d dependencies/common/rsconnect
92+ mkdir -p dependencies/common/libclang/3.5
93+ unzip $rstudiolibclang -d dependencies/common/libclang/3.5
94+ mkdir -p dependencies/common/libclang/builtin-headers
95+ unzip $rstudiolibclangheaders -d dependencies/common/libclang/builtin-headers
96+
97+ mkdir -p dependencies/common/pandoc
98+ cp ${pandoc}/bin/pandoc dependencies/common/pandoc/
7099 '';
71100
72− cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" ];
101+ cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=${qt5.qmakeHook}/bin/qmake" ];
73102
74103 desktopItem = makeDesktopItem {
75104 name = name;
@@ -100,7 +129,7 @@ stdenv.mkDerivation rec {
100129 { description = "Set of integrated tools for the R language";
101130 homepage = http://www.rstudio.com/;
102131 license = licenses.agpl3;
103− maintainers = [ maintainers.ehmry ];
132+ maintainers = [ maintainers.ehmry maintainers.changlinli ];
104133 platforms = platforms.linux;
105134 };
106135}
pkgs/applications/editors/rstudio/r-location.patch+7−6
@@ -1,18 +1,19 @@
1−diff -ur rstudio-0.98.110-old/src/cpp/core/CMakeLists.txt rstudio-0.98.110-new/src/cpp/core/CMakeLists.txt
2−--- rstudio-0.98.110-old/src/cpp/core/r_util/REnvironmentPosix.cpp 2013-04-28 10:02:14.000000000 -0400
3−+++ rstudio-0.98.110-new/src/cpp/core/r_util/REnvironmentPosix.cpp 2015-03-23 15:06:35.533400807 -0400
4−@@ -84,9 +84,7 @@
1+diff -ur rstudio-1.1.216-old/src/cpp/core/CMakeLists.txt rstudio-1.1.216-new/src/cpp/core/CMakeLists.txt
2+--- rstudio-1.1.216-old/src/cpp/core/r_util/REnvironmentPosix.cpp 2017-04-30 03:37:26.669418665 -0400
3++++ rstudio-1.1.216-new/src/cpp/core/r_util/REnvironmentPosix.cpp 2017-04-30 03:36:33.590726185 -0400
4+@@ -87,10 +87,7 @@
55 {
66 // define potential paths
77 std::vector<std::string> rScriptPaths;
88- rScriptPaths.push_back("/usr/bin/R");
99- rScriptPaths.push_back("/usr/local/bin/R");
1010- rScriptPaths.push_back("/opt/local/bin/R");
11+- rScriptPaths.push_back("/Library/Frameworks/R.framework/Resources/bin/R");
1112+ rScriptPaths.push_back("@R@/bin/R");
1213 return scanForRScript(rScriptPaths, pErrMsg);
1314 }
14−
15−@@ -220,8 +218,7 @@
15+
16+@@ -226,8 +223,7 @@
1617 // scan in standard locations as a fallback
1718 std::string scanErrMsg;
1819 std::vector<std::string> rScriptPaths;