mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
RStudio: initial commit at version 0.98.110
This commit is contained in:
parent
4d47c0dd24
commit
a3de8552b0
71
pkgs/applications/editors/rstudio/default.nix
Normal file
71
pkgs/applications/editors/rstudio/default.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{ stdenv, fetchurl, cmake, boost155, zlib, openssl, R, qt4, libuuid, hunspellDicts, unzip, ant, jdk }:
|
||||
|
||||
let
|
||||
version = "0.98.110";
|
||||
ginVer = "1.5";
|
||||
gwtVer = "2.5.1";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "RStudio-${version}";
|
||||
|
||||
buildInputs = [ cmake boost155 zlib openssl R qt4 libuuid unzip ant jdk ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz";
|
||||
sha256 = "0wybbvl5libki8z2ywgcd0hg0py1az484r95lhwh3jbrwfx7ri2z";
|
||||
};
|
||||
|
||||
# Hack RStudio to only use the input R.
|
||||
patches = [ ./r-location.patch ];
|
||||
postPatch = "substituteInPlace src/cpp/core/r_util/REnvironmentPosix.cpp --replace '@R@' ${R}";
|
||||
|
||||
inherit ginVer;
|
||||
ginSrc = fetchurl {
|
||||
url = "https://s3.amazonaws.com/rstudio-buildtools/gin-${ginVer}.zip";
|
||||
sha256 = "155bjrgkf046b8ln6a55x06ryvm8agnnl7l8bkwwzqazbpmz8qgm";
|
||||
};
|
||||
|
||||
inherit gwtVer;
|
||||
gwtSrc = fetchurl {
|
||||
url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip";
|
||||
sha256 = "0fjr2rcr8lnywj54mzhg9i4xz1b6fh8yv12p5i2q5mgfld2xymy4";
|
||||
};
|
||||
|
||||
hunspellDicts = builtins.attrValues hunspellDicts;
|
||||
|
||||
mathJaxSrc = fetchurl {
|
||||
url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-20.zip;
|
||||
sha256 = "1ikg3fhharsfrh2fv8c53fdawqajj24nif89400l3klw1hyq4zal";
|
||||
};
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
GWT_LIB_DIR=src/gwt/lib
|
||||
|
||||
mkdir -p $GWT_LIB_DIR/gin/$ginVer
|
||||
unzip $ginSrc -d $GWT_LIB_DIR/gin/$ginVer
|
||||
|
||||
unzip $gwtSrc
|
||||
mkdir -p $GWT_LIB_DIR/gwt
|
||||
mv gwt-$gwtVer $GWT_LIB_DIR/gwt/$gwtVer
|
||||
|
||||
mkdir dependencies/common/dictionaries
|
||||
for dict in $hunspellDicts; do
|
||||
for i in $dict/share/hunspell/*
|
||||
do ln -sv $i dependencies/common/dictionaries/
|
||||
done
|
||||
done
|
||||
|
||||
unzip $mathJaxSrc -d dependencies/common/mathjax
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" ];
|
||||
|
||||
meta = with stdenv.lib;
|
||||
{ description = "Set of integrated tools for the R language";
|
||||
homepage = http://www.rstudio.com/;
|
||||
license = licenses.agpl3;
|
||||
maintainers = [ maintainers.emery ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
24
pkgs/applications/editors/rstudio/r-location.patch
Normal file
24
pkgs/applications/editors/rstudio/r-location.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -ur rstudio-0.98.110-old/src/cpp/core/CMakeLists.txt rstudio-0.98.110-new/src/cpp/core/CMakeLists.txt
|
||||
--- rstudio-0.98.110-old/src/cpp/core/r_util/REnvironmentPosix.cpp 2013-04-28 10:02:14.000000000 -0400
|
||||
+++ rstudio-0.98.110-new/src/cpp/core/r_util/REnvironmentPosix.cpp 2015-03-23 15:06:35.533400807 -0400
|
||||
@@ -84,9 +84,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("@R@/bin/R");
|
||||
return scanForRScript(rScriptPaths, pErrMsg);
|
||||
}
|
||||
|
||||
@@ -220,8 +218,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())
|
||||
{
|
@ -11523,6 +11523,8 @@ let
|
||||
automake = automake114x;
|
||||
};
|
||||
|
||||
rstudio = callPackage ../applications/editors/rstudio { };
|
||||
|
||||
rsync = callPackage ../applications/networking/sync/rsync {
|
||||
enableACLs = !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD);
|
||||
enableCopyDevicesPatch = (config.rsync.enableCopyDevicesPatch or false);
|
||||
|
Loading…
Reference in New Issue
Block a user