RStudio: 1.4.1717 -> 2022.02.3+492 (#177021)

rstudio: 1.4.1717 -> 2022.02.3+492

The old version does not compile with gcc11. Also the used nixos-22.05
libraries (R interpreter) have changed their interfaces that have to be
also patched. Updating RStudio is useful.

* Remove Quarto patch

Follow review in
https://github.com/NixOS/nixpkgs/pull/177021#pullrequestreview-1007625773

* Fix not FHS paths

Create explicit nix path replacement of hard coded FHS paths for pandoc and nodejs.
main
Goetz 2 years ago committed by GitHub
parent 1216d8e7ab
commit 1f95c49331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      pkgs/applications/editors/rstudio/default.nix
  2. 19
      pkgs/applications/editors/rstudio/fix-resources-path.patch
  3. 72
      pkgs/applications/editors/rstudio/package.json
  4. 11
      pkgs/applications/editors/rstudio/pandoc-nix-path.patch
  5. 28
      pkgs/applications/editors/rstudio/use-system-node.patch
  6. 913
      pkgs/applications/editors/rstudio/yarn.lock
  7. 1956
      pkgs/applications/editors/rstudio/yarndeps.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}
'';

@ -0,0 +1,19 @@
--- a/src/cpp/desktop/DesktopOptions.cpp
+++ b/src/cpp/desktop/DesktopOptions.cpp
@@ -499,15 +499,9 @@
{
if (resourcesPath_.isEmpty())
{
-#ifdef RSTUDIO_PACKAGE_BUILD
// release configuration: the 'resources' folder is
// part of the supporting files folder
- resourcesPath_ = supportingFilePath().completePath("resources");
-#else
- // developer configuration: the 'resources' folder is
- // a sibling of the RStudio executable
- resourcesPath_ = scriptsPath().completePath("resources");
-#endif
+ resourcesPath_ = supportingFilePath().completePath("resources");
}
return resourcesPath_;

@ -5,57 +5,59 @@
"license": "agpl-3.0",
"dependencies": {
"@types/ace": "^0.0.43",
"@types/clipboard": "^2.0.1",
"@types/clipboard": "^2.0.7",
"@types/diff-match-patch": "^1.0.32",
"@types/js-yaml": "^3.12.3",
"@types/js-yaml": "^4.0.3",
"@types/lodash.debounce": "^4.0.6",
"@types/lodash.orderby": "^4.6.6",
"@types/lodash.uniqby": "^4.7.6",
"@types/orderedmap": "^1.0.0",
"@types/prosemirror-commands": "^1.0.3",
"@types/prosemirror-dev-tools": "^2.1.0",
"@types/prosemirror-dropcursor": "^1.0.0",
"@types/prosemirror-gapcursor": "^1.0.1",
"@types/prosemirror-history": "^1.0.1",
"@types/prosemirror-inputrules": "^1.0.3",
"@types/prosemirror-keymap": "^1.0.3",
"@types/prosemirror-model": "^1.7.2",
"@types/prosemirror-schema-list": "^1.0.1",
"@types/prosemirror-state": "^1.2.5",
"@types/pinyin": "^2.10.0",
"@types/prosemirror-commands": "^1.0.4",
"@types/prosemirror-dropcursor": "^1.0.3",
"@types/prosemirror-gapcursor": "^1.0.4",
"@types/prosemirror-history": "^1.0.3",
"@types/prosemirror-inputrules": "^1.0.4",
"@types/prosemirror-keymap": "^1.0.4",
"@types/prosemirror-schema-list": "^1.0.3",
"@types/prosemirror-tables": "^0.9.1",
"@types/prosemirror-transform": "^1.1.1",
"@types/react": "^16.9.32",
"@types/react-dom": "^16.9.6",
"@types/react-window": "^1.8.2",
"@types/zenscroll": "^4.0.0",
"biblatex-csl-converter": "^1.9.1",
"clipboard": "^2.0.6",
"diff-match-patch": "^1.0.4",
"fuse.js": "^6.0.4",
"js-yaml": "^3.13.1",
"@types/react": "^17.0.20",
"@types/react-dom": "^17.0.9",
"@types/react-window": "^1.8.5",
"@types/transliteration": "^1.6.6",
"@types/zenscroll": "^4.0.1",
"biblatex-csl-converter": "^2.0.2",
"clipboard": "^2.0.8",
"diff-match-patch": "^1.0.5",
"fuse.js": "^6.4.6",
"js-yaml": "^4.1.0",
"lodash.debounce": "^4.0.8",
"lodash.orderby": "^4.6.0",
"lodash.uniqby": "^4.7.0",
"orderedmap": "^1.0.0",
"pinyin": "^2.10.2",
"prosemirror-changeset": "^2.1.2",
"prosemirror-commands": "^1.1.4",
"prosemirror-commands": "^1.1.10",
"prosemirror-dev-tools": "^2.1.1",
"prosemirror-dropcursor": "^1.3.2",
"prosemirror-dropcursor": "^1.3.5",
"prosemirror-gapcursor": "^1.1.5",
"prosemirror-history": "^1.1.3",
"prosemirror-inputrules": "^1.1.2",
"prosemirror-history": "^1.2.0",
"prosemirror-inputrules": "^1.1.3",
"prosemirror-keymap": "^1.1.4",
"prosemirror-model": "^1.11.0",
"prosemirror-schema-list": "^1.1.4",
"prosemirror-state": "^1.3.3",
"prosemirror-model": "^1.14.3",
"prosemirror-schema-list": "^1.1.5",
"prosemirror-state": "^1.3.4",
"prosemirror-tables": "^1.1.1",
"prosemirror-transform": "^1.2.8",
"prosemirror-transform": "^1.3.2",
"prosemirror-utils": "^0.9.6",
"prosemirror-view": "^1.15.6",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-window": "^1.8.5",
"sentence-splitter": "^3.2.0",
"prosemirror-view": "^1.20.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-window": "^1.8.6",
"sentence-splitter": "^3.2.2",
"thenby": "^1.3.3",
"tlite": "^0.1.9",
"transliteration": "^2.2.0",
"typescript": "3.8.3",
"zenscroll": "^4.0.2"
},

@ -0,0 +1,11 @@
--- a/src/cpp/session/include/session/SessionConstants.hpp
+++ b/src/cpp/session/include/session/SessionConstants.hpp
@@ -140,7 +140,7 @@
#ifdef QUARTO_ENABLED
# define kDefaultPandocPath "bin/quarto/bin"
#else
-# define kDefaultPandocPath "bin/pandoc"
+# define kDefaultPandocPath "@pandoc@"
#endif
#define kDefaultQuartoPath "bin/quarto"

@ -0,0 +1,28 @@
--- a/src/gwt/build.xml
+++ b/src/gwt/build.xml
@@ -84,23 +84,7 @@
</target>
<!-- panmirror typescript library -->
- <!-- ensure version matches RSTUDIO_NODE_VERSION -->
- <property name="node.version" value="14.17.5"/>
- <property name="node.dir" value="../../dependencies/common/node/${node.version}"/>
- <condition property="node.bin" value="../../../${node.dir}/bin/node">
- <not>
- <os family="windows" />
- </not>
- </condition>
- <condition property="node.bin" value="${node.dir}/node.exe">
- <os family="windows" />
- </condition>
-
- <!-- use node from /opt/rstudio-tools if installed (typical for Docker) -->
- <available
- 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"/>
+ <property name="node.bin" value="@node@/bin/node"/>
<property name="panmirror.dir" value="./panmirror/src/editor"/>
<property name="panmirror.build.dir" value="./www/js/panmirror"/>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save