RStudio: 0.98.110 -> 1.1.216

This fixes incompatibilities introduced by a new R version in
d16c38a260ef41ae648f994918f491437fb7c75c

It also fixes #25315 as a result.

+48 -18
+41 -12
pkgs/applications/editors/rstudio/default.nix
··· 1 - { stdenv, fetchurl, makeDesktopItem, cmake, boost155, zlib, openssl, 2 - R, qt4, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper, 3 # If you have set up an R wrapper with other packages by following 4 # something like https://nixos.org/nixpkgs/manual/#r-packages, RStudio 5 # by default not be able to access any of those R packages. In order ··· 11 }: 12 13 let 14 - version = "0.98.110"; 15 ginVer = "1.5"; 16 - gwtVer = "2.5.1"; 17 in 18 stdenv.mkDerivation rec { 19 name = "RStudio-${version}"; 20 21 - buildInputs = [ cmake boost155 zlib openssl R qt4 libuuid unzip ant jdk makeWrapper ]; 22 23 src = fetchurl { 24 url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz"; 25 - sha256 = "0wybbvl5libki8z2ywgcd0hg0py1az484r95lhwh3jbrwfx7ri2z"; 26 }; 27 28 # Hack RStudio to only use the input R. ··· 38 inherit gwtVer; 39 gwtSrc = fetchurl { 40 url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip"; 41 - sha256 = "0fjr2rcr8lnywj54mzhg9i4xz1b6fh8yv12p5i2q5mgfld2xymy4"; 42 }; 43 44 hunspellDictionaries = builtins.attrValues hunspellDicts; 45 46 mathJaxSrc = fetchurl { 47 - url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-20.zip; 48 - sha256 = "1ikg3fhharsfrh2fv8c53fdawqajj24nif89400l3klw1hyq4zal"; 49 }; 50 51 preConfigure = ··· 66 done 67 done 68 69 - unzip $mathJaxSrc -d dependencies/common/mathjax 70 ''; 71 72 - cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" ]; 73 74 desktopItem = makeDesktopItem { 75 name = name; ··· 100 { description = "Set of integrated tools for the R language"; 101 homepage = http://www.rstudio.com/; 102 license = licenses.agpl3; 103 - maintainers = [ maintainers.ehmry ]; 104 platforms = platforms.linux; 105 }; 106 }
··· 1 + { stdenv, fetchurl, makeDesktopItem, cmake, boost163, zlib, openssl, 2 + R, qt5, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper, pandoc, 3 # If you have set up an R wrapper with other packages by following 4 # something like https://nixos.org/nixpkgs/manual/#r-packages, RStudio 5 # by default not be able to access any of those R packages. In order ··· 11 }: 12 13 let 14 + version = "1.1.216"; 15 ginVer = "1.5"; 16 + gwtVer = "2.7.0"; 17 in 18 stdenv.mkDerivation rec { 19 name = "RStudio-${version}"; 20 21 + buildInputs = [ cmake boost163 zlib openssl R qt5.full qt5.qtwebkit qt5.qmakeHook libuuid unzip ant jdk makeWrapper pandoc ]; 22 23 src = fetchurl { 24 url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz"; 25 + sha256 = "07lp2ybvj7ippdrp7fv7j54dp0mm6k19j1vqdvjdk95acg3xgcjf"; 26 }; 27 28 # Hack RStudio to only use the input R. ··· 38 inherit gwtVer; 39 gwtSrc = fetchurl { 40 url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip"; 41 + sha256 = "1cs78z9a1jg698j2n35wsy07cy4fxcia9gi00x0r0qc3fcdhcrda"; 42 }; 43 44 hunspellDictionaries = builtins.attrValues hunspellDicts; 45 46 mathJaxSrc = fetchurl { 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"; 69 }; 70 71 preConfigure = ··· 86 done 87 done 88 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/ 99 ''; 100 101 + cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=${qt5.qmakeHook}/bin/qmake" ]; 102 103 desktopItem = makeDesktopItem { 104 name = name; ··· 129 { description = "Set of integrated tools for the R language"; 130 homepage = http://www.rstudio.com/; 131 license = licenses.agpl3; 132 + maintainers = [ maintainers.ehmry maintainers.changlinli ]; 133 platforms = platforms.linux; 134 }; 135 }
+7 -6
pkgs/applications/editors/rstudio/r-location.patch
··· 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 @@ 5 { 6 // define potential paths 7 std::vector<std::string> rScriptPaths; 8 - rScriptPaths.push_back("/usr/bin/R"); 9 - rScriptPaths.push_back("/usr/local/bin/R"); 10 - rScriptPaths.push_back("/opt/local/bin/R"); 11 + rScriptPaths.push_back("@R@/bin/R"); 12 return scanForRScript(rScriptPaths, pErrMsg); 13 } 14 - 15 - @@ -220,8 +218,7 @@ 16 // scan in standard locations as a fallback 17 std::string scanErrMsg; 18 std::vector<std::string> rScriptPaths;
··· 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 @@ 5 { 6 // define potential paths 7 std::vector<std::string> rScriptPaths; 8 - rScriptPaths.push_back("/usr/bin/R"); 9 - rScriptPaths.push_back("/usr/local/bin/R"); 10 - rScriptPaths.push_back("/opt/local/bin/R"); 11 + - rScriptPaths.push_back("/Library/Frameworks/R.framework/Resources/bin/R"); 12 + rScriptPaths.push_back("@R@/bin/R"); 13 return scanForRScript(rScriptPaths, pErrMsg); 14 } 15 + 16 + @@ -226,8 +223,7 @@ 17 // scan in standard locations as a fallback 18 std::string scanErrMsg; 19 std::vector<std::string> rScriptPaths;