nixpkgs/pkgs/applications/editors/rstudio/r-location.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
1 KiB
Diff
Raw Normal View History

2021-09-29 11:53:34 +00:00
diff --git a/src/cpp/core/r_util/REnvironmentPosix.cpp b/src/cpp/core/r_util/REnvironmentPosix.cpp
index dbc9a9a1..9a526a86 100644
--- a/src/cpp/core/r_util/REnvironmentPosix.cpp
+++ b/src/cpp/core/r_util/REnvironmentPosix.cpp
@@ -107,12 +107,9 @@ FilePath systemDefaultRScript(std::string* pErrMsg)
{
2021-09-29 11:53:34 +00:00
// check fallback paths
std::vector<std::string> rScriptPaths = {
- "/usr/bin/R",
- "/usr/local/bin/R",
- "/opt/local/bin/R",
+ "@R@/bin/R"
#ifdef __APPLE__
- "/opt/homebrew/bin/R",
- "/Library/Frameworks/R.framework/Resources/bin/R",
+ "@R@/bin/R",
#endif
};
2021-09-29 11:53:34 +00:00
@@ -225,8 +222,7 @@ FilePath systemDefaultRScript(std::string* pErrMsg)
// 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);
2021-09-29 11:53:34 +00:00
if (scriptPath.isEmpty())
{
2021-09-29 11:53:34 +00:00