about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/rstudio/r-location.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/rstudio/r-location.patch')
-rw-r--r--nixpkgs/pkgs/applications/editors/rstudio/r-location.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/editors/rstudio/r-location.patch b/nixpkgs/pkgs/applications/editors/rstudio/r-location.patch
new file mode 100644
index 000000000000..24cb6a246977
--- /dev/null
+++ b/nixpkgs/pkgs/applications/editors/rstudio/r-location.patch
@@ -0,0 +1,25 @@
+diff -ur rstudio-1.1.216-old/src/cpp/core/CMakeLists.txt rstudio-1.1.216-new/src/cpp/core/CMakeLists.txt
+--- rstudio-1.1.216-old/src/cpp/core/r_util/REnvironmentPosix.cpp	2017-04-30 03:37:26.669418665 -0400
++++ rstudio-1.1.216-new/src/cpp/core/r_util/REnvironmentPosix.cpp	2017-04-30 03:36:33.590726185 -0400
+@@ -87,10 +87,7 @@
+ {
+    // define potential paths
+    std::vector<std::string> rScriptPaths;
+-   rScriptPaths.push_back("/usr/bin/R");
+-   rScriptPaths.push_back("/usr/local/bin/R");
+-   rScriptPaths.push_back("/opt/local/bin/R");
+-   rScriptPaths.push_back("/Library/Frameworks/R.framework/Resources/bin/R");
++   rScriptPaths.push_back("@R@/bin/R");
+    return scanForRScript(rScriptPaths, pErrMsg);
+ }
+ 
+@@ -226,8 +223,7 @@
+       // scan in standard locations as a fallback
+       std::string scanErrMsg;
+       std::vector<std::string> rScriptPaths;
+-      rScriptPaths.push_back("/usr/local/bin/R");
+-      rScriptPaths.push_back("/usr/bin/R");
++      rScriptPaths.push_back("@R@/bin/R");
+       FilePath scriptPath = scanForRScript(rScriptPaths, &scanErrMsg);
+       if (scriptPath.empty())
+       {