Skip to content

Commit b511a4d

Browse files
authored
rstudio: 2025.09.2+418 -> 2026.01.0+392 (#477606)
2 parents d4815de + 0441e12 commit b511a4d

File tree

2 files changed

+85
-36
lines changed

2 files changed

+85
-36
lines changed

pkgs/by-name/rs/rstudio/fix-darwin.patch

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,65 @@
11
diff --git a/cmake/globals.cmake b/cmake/globals.cmake
2-
index e53248b..c705d67 100644
2+
index 3601ee4..5090f32 100644
33
--- a/cmake/globals.cmake
44
+++ b/cmake/globals.cmake
5-
@@ -334,6 +334,7 @@ if (APPLE)
5+
@@ -340,6 +340,7 @@ if (APPLE)
66
set(RSTUDIO_INSTALL_SUPPORTING RStudio.app/Contents/Resources/app)
77
# handles Quarto share when not stored alongside bin
88
set(RSTUDIO_INSTALL_RESOURCES RStudio.app/Contents/Resources)
99
+ set(RSTUDIO_INSTALL_ELECTRON .)
1010
else()
1111
set(RSTUDIO_INSTALL_BIN RStudio.app/Contents/MacOS)
1212
set(RSTUDIO_INSTALL_SUPPORTING RStudio.app/Contents/Resources)
13+
@@ -470,44 +471,6 @@ macro(add_stripped_executable _target)
14+
define_source_file_names("${_target}")
15+
endmacro(add_stripped_executable)
16+
17+
-if(APPLE)
18+
-
19+
- # set Homebrew prefix directory
20+
- if(NOT DEFINED HOMEBREW_PREFIX)
21+
-
22+
- if(UNAME_M STREQUAL arm64)
23+
- set(HOMEBREW_PREFIX_FALLBACK /opt/homebrew)
24+
- else()
25+
- set(HOMEBREW_PREFIX_FALLBACK /usr/local)
26+
- endif()
27+
-
28+
- find_path(HOMEBREW_PREFIX
29+
- NAMES bin/brew
30+
- HINTS
31+
- "${HOMEBREW_PREFIX_FALLBACK}")
32+
-
33+
- message(STATUS "Using Homebrew: ${HOMEBREW_PREFIX}")
34+
-
35+
- endif()
36+
-
37+
- # help Boost find icu4c
38+
- if(RSTUDIO_USE_SYSTEM_BOOST)
39+
- link_directories(${HOMEBREW_PREFIX}/opt/icu4c/lib)
40+
- endif()
41+
-
42+
- # set OPENSSL_ROOT_DIR if unset
43+
- if(NOT DEFINED OPENSSL_ROOT_DIR)
44+
-
45+
- file(GLOB OPENSSL_ROOT_CANDIDATE "${HOMEBREW_PREFIX}/Cellar/openssl/*")
46+
- if(EXISTS "${OPENSSL_ROOT_CANDIDATE}")
47+
- set(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_CANDIDATE}" CACHE INTERNAL "")
48+
- elseif(EXISTS "${HOMEBREW_PREFIX}/opt/openssl")
49+
- set(OPENSSL_ROOT_DIR "${HOMEBREW_PREFIX}/opt/openssl" CACHE INTERNAL "")
50+
- endif()
51+
-
52+
- endif()
53+
-
54+
-endif()
55+
56+
# If enabled, use caching for the build
57+
if(SCCACHE_ENABLED)
1358
diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
14-
index 76f3acb..2910cee 100644
59+
index 62688dd..f909f8d 100644
1560
--- a/src/cpp/CMakeLists.txt
1661
+++ b/src/cpp/CMakeLists.txt
17-
@@ -243,7 +243,7 @@ endif()
62+
@@ -167,7 +167,7 @@ endif()
1863
# determine whether we should statically link boost. we always do this
1964
# unless we are building a non-packaged build on linux (in which case
2065
# boost dynamic libraries are presumed to be installed on the system ldpath)
@@ -23,7 +68,7 @@ index 76f3acb..2910cee 100644
2368
set(Boost_USE_STATIC_LIBS ON)
2469
endif()
2570

26-
@@ -483,7 +483,7 @@ endif()
71+
@@ -304,7 +304,7 @@ endif()
2772

2873
# find SOCI libraries
2974
if(UNIX)
@@ -32,8 +77,20 @@ index 76f3acb..2910cee 100644
3277
find_library(SOCI_CORE_LIB NAMES "libsoci_core.a" "soci_core" REQUIRED)
3378
find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.a" "soci_sqlite3" REQUIRED)
3479
if(RSTUDIO_PRO_BUILD)
80+
diff --git a/src/cpp/session/postback/CMakeLists.txt b/src/cpp/session/postback/CMakeLists.txt
81+
index 7bba997..4ef0abf 100644
82+
--- a/src/cpp/session/postback/CMakeLists.txt
83+
+++ b/src/cpp/session/postback/CMakeLists.txt
84+
@@ -36,6 +36,7 @@ add_stripped_executable(rpostback ${POSTBACK_SOURCE_FILES} ${POSTBACK_HEADER_FIL
85+
# set link dependencies
86+
target_link_libraries(rpostback
87+
rstudio-core
88+
+ ${FOUNDATION_LIBRARY}
89+
)
90+
91+
if (RSTUDIO_SERVER)
3592
diff --git a/src/node/CMakeNodeTools.txt b/src/node/CMakeNodeTools.txt
36-
index 40ae0f3..756fd5f 100644
93+
index fb3f394..3595f87 100644
3794
--- a/src/node/CMakeNodeTools.txt
3895
+++ b/src/node/CMakeNodeTools.txt
3996
@@ -27,17 +27,7 @@ endif()
@@ -85,10 +142,10 @@ index bccf5b3..0cc798a 100644
85142
OWNER_READ OWNER_WRITE OWNER_EXECUTE
86143
GROUP_READ GROUP_EXECUTE
87144
diff --git a/src/node/desktop/src/main/session-launcher.ts b/src/node/desktop/src/main/session-launcher.ts
88-
index 94f56ac..fe7d5d9 100644
145+
index d84de20..efef843 100644
89146
--- a/src/node/desktop/src/main/session-launcher.ts
90147
+++ b/src/node/desktop/src/main/session-launcher.ts
91-
@@ -91,29 +91,9 @@ function launchProcess(absPath: FilePath, argList: string[]): ChildProcess {
148+
@@ -85,29 +85,9 @@ function launchProcess(absPath: FilePath, argList: string[]): ChildProcess {
92149
// DYLD_INSERT_LIBRARIES to inject the library we wish to use
93150
const rHome = new FilePath(getenv('R_HOME'));
94151
const rLib = rHome.completePath('lib/libR.dylib');
@@ -121,7 +178,7 @@ index 94f56ac..fe7d5d9 100644
121178
}
122179

123180
const rsessionOptions = new LogOptions('rsession');
124-
@@ -566,22 +546,6 @@ export class SessionLauncher {
181+
@@ -563,22 +543,6 @@ export class SessionLauncher {
125182
}
126183
}
127184

pkgs/by-name/rs/rstudio/package.nix

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
git,
1818
jdk,
1919
makeWrapper,
20-
nodejs_22,
20+
nodejs,
2121
npmHooks,
2222
xcbuild,
2323
yarn,
2424
yarnConfigHook,
2525
zip,
2626

2727
boost187,
28-
electron_37,
28+
electron_38,
2929
fontconfig,
3030
gnumake,
3131
hunspellDicts,
@@ -44,11 +44,7 @@
4444
}:
4545

4646
let
47-
# nodejs_24 has npm v11, which broke the lockfile
48-
# let's just use nodejs_22 for now
49-
nodejs = nodejs_22;
50-
51-
electron = electron_37;
47+
electron = electron_38;
5248

5349
mathJaxSrc = fetchzip {
5450
url = "https://s3.amazonaws.com/rstudio-buildtools/mathjax-27.zip";
@@ -66,10 +62,8 @@ let
6662
owner = "quarto-dev";
6763
repo = "quarto";
6864
# Note: rev should ideally be the last commit of the release/rstudio-[codename] branch
69-
# Note: This is the last working revision, because https://github.com/quarto-dev/quarto/pull/757
70-
# started using `file:` in the lockfile, which our fetcher can't handle
71-
rev = "faef822a085df65809adf55fb77c273e9cdb87b9";
72-
hash = "sha256-DLpVYl0OkaBQtkFinJAS2suZ8gqx9BVS5HBaYrrT1HA=";
65+
rev = "591b3520eafbb4da7b26b9f31aac6948801f19d8";
66+
hash = "sha256-scdm66Ekfjp5wdNDXcVZA5ZhNgFvuf/kIBF56HrE8uM=";
7367
};
7468

7569
hunspellDictionaries = lib.filter lib.isDerivation (lib.unique (lib.attrValues hunspellDicts));
@@ -91,13 +85,13 @@ let
9185
in
9286
stdenv.mkDerivation rec {
9387
pname = "RStudio";
94-
version = "2025.09.2+418";
88+
version = "2026.01.0+392";
9589

9690
src = fetchFromGitHub {
9791
owner = "rstudio";
9892
repo = "rstudio";
9993
tag = "v${version}";
100-
hash = "sha256-UFhvNLamKZQ9IBjEtDvSPOUILqGphDDOVb7ZZ8dnfVU=";
94+
hash = "sha256-Q79uoNKh4plRFTe3uOTr27Hh/fMMkCbRPveZyq7cHQk=";
10195
};
10296

10397
# sources fetched into _deps via cmake's FetchContent
@@ -129,7 +123,7 @@ stdenv.mkDerivation rec {
129123
dontBuild = true;
130124
dontFixup = true;
131125

132-
outputHash = "sha256-pXpp42hjjKrV75f2XLDYK7A9lrvWhuQBDJ0oymXE8Fg=";
126+
outputHash = "sha256-t2kWnviFMw7TdxaJpiGDXe0M5HSIGD7o5hqWiPKUdOc=";
133127
outputHashAlgo = "sha256";
134128
outputHashMode = "recursive";
135129
};
@@ -183,7 +177,6 @@ stdenv.mkDerivation rec {
183177
(lib.cmakeBool "RSTUDIO_DISABLE_CHECK_FOR_UPDATES" true)
184178
(lib.cmakeBool "QUARTO_ENABLED" true)
185179
(lib.cmakeBool "RSTUDIO_ENABLE_COPILOT" false) # copilot-language-server is unfree
186-
(lib.cmakeBool "RSTUDIO_CRASHPAD_ENABLED" false) # This is a NOOP except on x86_64-darwin
187180

188181
(lib.cmakeFeature "CMAKE_INSTALL_PREFIX" (
189182
(placeholder "out") + (if stdenv.hostPlatform.isDarwin then "/Applications" else "/lib/rstudio")
@@ -240,7 +233,7 @@ stdenv.mkDerivation rec {
240233

241234
yarnOfflineCache = fetchYarnDeps {
242235
src = quartoSrc;
243-
hash = "sha256-9ObJ3fzxPyGVfIgBj4BhCWqkrG1A2JqZsCreJA+1fWQ=";
236+
hash = "sha256-XRxClyAaz3ja+Tr97aoqVxKhWOxezZ6OmEPGILdeOww=";
244237
};
245238

246239
dontYarnInstallDeps = true; # will call manually in preConfigure
@@ -256,7 +249,7 @@ stdenv.mkDerivation rec {
256249
name = "rstudio-${version}-npm-deps";
257250
inherit src;
258251
postPatch = "cd ${npmRoot}";
259-
hash = "sha256-/5GgRusDRyBMr5581ypTMzhqkvjpzYBaniFos524bEw=";
252+
hash = "sha256-7gXLCFhan/TCTlc2okMWuWzfRYXmuwcqhmGKAqJOEM0=";
260253
};
261254

262255
preConfigure = ''
@@ -290,10 +283,14 @@ stdenv.mkDerivation rec {
290283
# version in dependencies/common/install-mathjax
291284
ln -s ${mathJaxSrc} dependencies/mathjax-27
292285
286+
# node used by cmake and node used for distribution
287+
# version in cmake/globals.cmake
288+
RSTUDIO_NODE_VERSION="22.13.1"
289+
RSTUDIO_INSTALLED_NODE_VERSION="22.21.1"
290+
293291
mkdir -p dependencies/common/node
294-
# node used by cmake
295-
# version in cmake/globals.cmake (RSTUDIO_NODE_VERSION)
296-
ln -s ${nodejs} dependencies/common/node/22.13.1
292+
ln -s ${nodejs} dependencies/common/node/$RSTUDIO_NODE_VERSION
293+
ln -s ${nodejs} dependencies/common/node/$RSTUDIO_INSTALLED_NODE_VERSION-installed
297294
298295
''
299296
+ lib.optionalString (!server) ''
@@ -320,11 +317,6 @@ stdenv.mkDerivation rec {
320317
substituteInPlace node_modules/@electron/packager/dist/packager.js \
321318
--replace-fail "await this.getElectronZipPath(downloadOpts)" "'$(pwd)/electron.zip'"
322319
323-
# Work around known nan issue for electron_33 and above
324-
# https://github.com/nodejs/nan/issues/978
325-
substituteInPlace node_modules/nan/nan.h \
326-
--replace-fail '#include "nan_scriptorigin.h"' ""
327-
328320
# now that we patched everything, we still have to run the scripts we ignored with --ignore-scripts
329321
npm rebuild
330322
@@ -335,7 +327,7 @@ stdenv.mkDerivation rec {
335327
mkdir -p $out/bin
336328
''
337329
+ lib.optionalString (server && stdenv.hostPlatform.isLinux) ''
338-
ln -s $out/lib/rstudio/bin/{crash-handler-proxy,postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin
330+
ln -s $out/lib/rstudio/bin/{postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin
339331
''
340332
+ lib.optionalString (!server && stdenv.hostPlatform.isLinux) ''
341333
# remove unneeded electron files, since we'll wrap the app with our own electron
@@ -350,7 +342,7 @@ stdenv.mkDerivation rec {
350342
ln -s $out/lib/rstudio/resources/app/bin/{diagnostics,rpostback} $out/bin
351343
''
352344
+ lib.optionalString (server && stdenv.hostPlatform.isDarwin) ''
353-
ln -s $out/Applications/RStudio.app/Contents/MacOS/{crash-handler-proxy,postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin
345+
ln -s $out/Applications/RStudio.app/Contents/MacOS/{postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin
354346
''
355347
+ lib.optionalString (!server && stdenv.hostPlatform.isDarwin) ''
356348
# electron can't find its files if we use a symlink here

0 commit comments

Comments
 (0)