From f76ab1db42acb4b11243121564aa538c606dcf12 Mon Sep 17 00:00:00 2001 From: Goetz Date: Tue, 20 Sep 2022 11:24:19 +0200 Subject: [PATCH] RStudio: 2022.02.3+492 -> 2022.07.1.+554 (#185154) RStudio: 2022.02.3+492 -> 2022.07.1.+554 Separate quarto fix and pandoc installation --- .../editors/rstudio/clang-location.patch | 12 +++---- pkgs/applications/editors/rstudio/default.nix | 13 ++++---- .../rstudio/do-not-install-pandoc.patch | 13 ++++++++ .../remove-quarto-from-generator.patch | 32 +++++++++++++++++++ .../editors/rstudio/use-system-node.patch | 13 ++++---- 5 files changed, 65 insertions(+), 18 deletions(-) create mode 100644 pkgs/applications/editors/rstudio/do-not-install-pandoc.patch create mode 100644 pkgs/applications/editors/rstudio/remove-quarto-from-generator.patch diff --git a/pkgs/applications/editors/rstudio/clang-location.patch b/pkgs/applications/editors/rstudio/clang-location.patch index 8e4a7e3d84c2..ea82678d1181 100644 --- a/pkgs/applications/editors/rstudio/clang-location.patch +++ b/pkgs/applications/editors/rstudio/clang-location.patch @@ -1,8 +1,6 @@ -diff --git a/src/cpp/core/libclang/LibClang.cpp b/src/cpp/core/libclang/LibClang.cpp -index 1186f3a..58e8cc7 100644 --- a/src/cpp/core/libclang/LibClang.cpp +++ b/src/cpp/core/libclang/LibClang.cpp -@@ -58,7 +58,7 @@ std::vector defaultCompileArgs(LibraryVersion version) +@@ -62,7 +62,7 @@ // we need to add in the associated libclang headers as // they are not discovered / used by default during compilation @@ -11,7 +9,7 @@ index 1186f3a..58e8cc7 100644 boost::format fmt("%1%/lib/clang/%2%/include"); fmt % llvmPath.getAbsolutePath() % version.asString(); std::string includePath = fmt.str(); -@@ -70,46 +70,7 @@ std::vector defaultCompileArgs(LibraryVersion version) +@@ -74,47 +74,7 @@ std::vector systemClangVersions() { @@ -55,7 +53,9 @@ index 1186f3a..58e8cc7 100644 - } -#endif - -+ std::vector clangVersions = { "@libclang.so@" }; - return clangVersions; +- return clangVersions; ++ return std::vector { "@libclang.so@" }; } + + diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 9a362fec65be..50f69300aa04 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -39,17 +39,17 @@ let pname = "RStudio"; - version = "2022.02.3+492"; + version = "2022.07.1+554"; RSTUDIO_VERSION_MAJOR = "2022"; - RSTUDIO_VERSION_MINOR = "02"; - RSTUDIO_VERSION_PATCH = "3"; - RSTUDIO_VERSION_SUFFIX = "+492"; + RSTUDIO_VERSION_MINOR = "07"; + RSTUDIO_VERSION_PATCH = "1"; + RSTUDIO_VERSION_SUFFIX = "+554"; src = fetchFromGitHub { owner = "rstudio"; repo = "rstudio"; rev = "v${version}"; - sha256 = "1pgbk5rpy47h9ihdrplbfhfc49hrc6242j9099bclq7rqif049wi"; + sha256 = "0rmdqxizxqg2vgr3lv066cjmlpjrxjlgi0m97wbh6iyhkfm2rrj1"; }; mathJaxSrc = fetchurl { @@ -129,6 +129,8 @@ in ./use-system-node.patch ./fix-resources-path.patch ./pandoc-nix-path.patch + ./remove-quarto-from-generator.patch + ./do-not-install-pandoc.patch ]; postPatch = '' @@ -196,7 +198,6 @@ in done rm -r $out/lib/rstudio/{INSTALL,COPYING,NOTICE,README.md,SOURCE,VERSION} - rm -r $out/lib/rstudio/bin/{pandoc/pandoc,pandoc} ''; meta = with lib; { diff --git a/pkgs/applications/editors/rstudio/do-not-install-pandoc.patch b/pkgs/applications/editors/rstudio/do-not-install-pandoc.patch new file mode 100644 index 000000000000..25bfb2b1e8f4 --- /dev/null +++ b/pkgs/applications/editors/rstudio/do-not-install-pandoc.patch @@ -0,0 +1,13 @@ +--- a/src/cpp/session/CMakeLists.txt ++++ b/src/cpp/session/CMakeLists.txt +@@ -60,8 +60,7 @@ + + # validate our dependencies exist + foreach(VAR RSTUDIO_DEPENDENCIES_DICTIONARIES_DIR +- RSTUDIO_DEPENDENCIES_MATHJAX_DIR +- RSTUDIO_DEPENDENCIES_PANDOC_DIR) ++ RSTUDIO_DEPENDENCIES_MATHJAX_DIR) + + # validate existence + if(NOT EXISTS "${${VAR}}") + diff --git a/pkgs/applications/editors/rstudio/remove-quarto-from-generator.patch b/pkgs/applications/editors/rstudio/remove-quarto-from-generator.patch new file mode 100644 index 000000000000..1c28bbada6da --- /dev/null +++ b/pkgs/applications/editors/rstudio/remove-quarto-from-generator.patch @@ -0,0 +1,32 @@ +--- a/src/cpp/session/CMakeLists.txt ++++ b/src/cpp/session/CMakeLists.txt +@@ -43,12 +43,6 @@ + set(RSTUDIO_DEPENDENCIES_MATHJAX_DIR "${RSTUDIO_DEPENDENCIES_DIR}/mathjax-27") + endif() + +- if(EXISTS "${RSTUDIO_TOOLS_ROOT}/quarto") +- set(RSTUDIO_DEPENDENCIES_QUARTO_DIR "${RSTUDIO_TOOLS_ROOT}/quarto") +- else() +- set(RSTUDIO_DEPENDENCIES_QUARTO_DIR "${RSTUDIO_DEPENDENCIES_DIR}/quarto") +- endif() +- + endif() + + +@@ -67,14 +61,7 @@ + # validate our dependencies exist + foreach(VAR RSTUDIO_DEPENDENCIES_DICTIONARIES_DIR + RSTUDIO_DEPENDENCIES_MATHJAX_DIR +- RSTUDIO_DEPENDENCIES_PANDOC_DIR +- RSTUDIO_DEPENDENCIES_QUARTO_DIR) +- +- +- # skip quarto if not enabled +- if("${VAR}" STREQUAL "RSTUDIO_DEPENDENCIES_QUARTO_DIR" AND NOT QUARTO_ENABLED) +- continue() +- endif() ++ RSTUDIO_DEPENDENCIES_PANDOC_DIR) + + # validate existence + if(NOT EXISTS "${${VAR}}") + diff --git a/pkgs/applications/editors/rstudio/use-system-node.patch b/pkgs/applications/editors/rstudio/use-system-node.patch index b78adbaee263..248f4fe86e21 100644 --- a/pkgs/applications/editors/rstudio/use-system-node.patch +++ b/pkgs/applications/editors/rstudio/use-system-node.patch @@ -1,11 +1,12 @@ --- a/src/gwt/build.xml +++ b/src/gwt/build.xml -@@ -84,23 +84,7 @@ +@@ -83,24 +83,7 @@ + Concatenated acesupport files to 'acesupport.js' - - + +- - -- +- - - - @@ -21,8 +22,8 @@ - property="node.bin" - value="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/node" - file="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/node"/> -+ - ++ +