about summary refs log tree commit diff
path: root/pkgs/applications/editors/rstudio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/rstudio/default.nix')
-rw-r--r--pkgs/applications/editors/rstudio/default.nix34
1 files changed, 16 insertions, 18 deletions
diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix
index 665a7ebcbfbf0..9a362fec65be3 100644
--- a/pkgs/applications/editors/rstudio/default.nix
+++ b/pkgs/applications/editors/rstudio/default.nix
@@ -39,16 +39,17 @@
 
 let
   pname = "RStudio";
-  version = "1.4.1717";
-  RSTUDIO_VERSION_MAJOR = lib.versions.major version;
-  RSTUDIO_VERSION_MINOR = lib.versions.minor version;
-  RSTUDIO_VERSION_PATCH = lib.versions.patch version;
+  version = "2022.02.3+492";
+  RSTUDIO_VERSION_MAJOR  = "2022";
+  RSTUDIO_VERSION_MINOR  = "02";
+  RSTUDIO_VERSION_PATCH  = "3";
+  RSTUDIO_VERSION_SUFFIX = "+492";
 
   src = fetchFromGitHub {
     owner = "rstudio";
     repo = "rstudio";
     rev = "v${version}";
-    sha256 = "sha256-9c1bNsf8kJjpcZ2cMV/pPNtXQkFOntX29a1cdnXpllE=";
+    sha256 = "1pgbk5rpy47h9ihdrplbfhfc49hrc6242j9099bclq7rqif049wi";
   };
 
   mathJaxSrc = fetchurl {
@@ -59,7 +60,7 @@ let
   rsconnectSrc = fetchFromGitHub {
     owner = "rstudio";
     repo = "rsconnect";
-    rev = "f5854bb71464f6e3017da9855f058fe3d5b32efd";
+    rev = "e287b586e7da03105de3faa8774c63f08984eb3c";
     sha256 = "sha256-ULyWdSgGPSAwMt0t4QPuzeUE6Bo6IJh+5BMgW1bFN+Y=";
   };
 
@@ -74,7 +75,7 @@ let
 in
 (if server then stdenv.mkDerivation else mkDerivation)
   (rec {
-    inherit pname version src RSTUDIO_VERSION_MAJOR RSTUDIO_VERSION_MINOR RSTUDIO_VERSION_PATCH;
+    inherit pname version src RSTUDIO_VERSION_MAJOR RSTUDIO_VERSION_MINOR RSTUDIO_VERSION_PATCH RSTUDIO_VERSION_SUFFIX;
 
     nativeBuildInputs = [
       cmake
@@ -114,6 +115,7 @@ in
       "-DRSTUDIO_USE_SYSTEM_SOCI=ON"
       "-DRSTUDIO_USE_SYSTEM_BOOST=ON"
       "-DRSTUDIO_USE_SYSTEM_YAML_CPP=ON"
+      "-DQUARTO_ENABLED=FALSE"
       "-DPANDOC_VERSION=${pandoc.version}"
       "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/lib/rstudio"
     ] ++ lib.optional (!server) [
@@ -124,14 +126,9 @@ in
     patches = [
       ./r-location.patch
       ./clang-location.patch
-      # postFetch doesn't work with this | error: unexpected end-of-file
-      # replacing /usr/bin/node is done in postPatch
-      # https://src.fedoraproject.org/rpms/rstudio/tree/rawhide
-      (fetchpatch {
-        name = "system-node.patch";
-        url = "https://src.fedoraproject.org/rpms/rstudio/raw/5bda2e290c9e72305582f2011040938d3e356906/f/0004-use-system-node.patch";
-        sha256 = "sha256-P1Y07RB/ceFNa749nyBUWSE41eiiZgt43zVcmahvfZM=";
-      })
+      ./use-system-node.patch
+      ./fix-resources-path.patch
+      ./pandoc-nix-path.patch
     ];
 
     postPatch = ''
@@ -141,14 +138,14 @@ in
         --replace 'SOCI_LIBRARY_DIR "/usr/lib"' 'SOCI_LIBRARY_DIR "${soci}/lib"'
 
       substituteInPlace src/gwt/build.xml \
-        --replace '/usr/bin/node' '${nodejs}/bin/node'
+        --replace '@node@' ${nodejs}
 
       substituteInPlace src/cpp/core/libclang/LibClang.cpp \
         --replace '@libclang@' ${llvmPackages.libclang.lib} \
         --replace '@libclang.so@' ${llvmPackages.libclang.lib}/lib/libclang.so
 
-        substituteInPlace src/cpp/session/include/session/SessionConstants.hpp \
-          --replace "bin/pandoc" "${pandoc}/bin/pandoc"
+      substituteInPlace src/cpp/session/include/session/SessionConstants.hpp \
+        --replace '@pandoc@' ${pandoc}/bin/pandoc
     '';
 
     hunspellDictionaries = with lib; filter isDerivation (unique (attrValues hunspellDicts));
@@ -197,6 +194,7 @@ in
       for f in .gitignore .Rbuildignore LICENSE README; do
         find . -name $f -delete
       done
+
       rm -r $out/lib/rstudio/{INSTALL,COPYING,NOTICE,README.md,SOURCE,VERSION}
       rm -r $out/lib/rstudio/bin/{pandoc/pandoc,pandoc}
     '';