Skip to content

Commit 992ecdf

Browse files
committed
rstudio: 2025.09.2+418 -> 2026.01.0+392
1 parent 201f9cd commit 992ecdf

File tree

2 files changed

+73
-35
lines changed

2 files changed

+73
-35
lines changed

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

Lines changed: 54 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)
@@ -33,7 +78,7 @@ index 76f3acb..2910cee 100644
3378
find_library(SOCI_SQLITE_LIB NAMES "libsoci_sqlite3.a" "soci_sqlite3" REQUIRED)
3479
if(RSTUDIO_PRO_BUILD)
3580
diff --git a/src/node/CMakeNodeTools.txt b/src/node/CMakeNodeTools.txt
36-
index 40ae0f3..756fd5f 100644
81+
index fb3f394..3595f87 100644
3782
--- a/src/node/CMakeNodeTools.txt
3883
+++ b/src/node/CMakeNodeTools.txt
3984
@@ -27,17 +27,7 @@ endif()
@@ -85,10 +130,10 @@ index bccf5b3..0cc798a 100644
85130
OWNER_READ OWNER_WRITE OWNER_EXECUTE
86131
GROUP_READ GROUP_EXECUTE
87132
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
133+
index d84de20..efef843 100644
89134
--- a/src/node/desktop/src/main/session-launcher.ts
90135
+++ b/src/node/desktop/src/main/session-launcher.ts
91-
@@ -91,29 +91,9 @@ function launchProcess(absPath: FilePath, argList: string[]): ChildProcess {
136+
@@ -85,29 +85,9 @@ function launchProcess(absPath: FilePath, argList: string[]): ChildProcess {
92137
// DYLD_INSERT_LIBRARIES to inject the library we wish to use
93138
const rHome = new FilePath(getenv('R_HOME'));
94139
const rLib = rHome.completePath('lib/libR.dylib');
@@ -121,7 +166,7 @@ index 94f56ac..fe7d5d9 100644
121166
}
122167

123168
const rsessionOptions = new LogOptions('rsession');
124-
@@ -566,22 +546,6 @@ export class SessionLauncher {
169+
@@ -563,22 +543,6 @@ export class SessionLauncher {
125170
}
126171
}
127172

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

Lines changed: 19 additions & 26 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
};
@@ -240,7 +234,7 @@ stdenv.mkDerivation rec {
240234

241235
yarnOfflineCache = fetchYarnDeps {
242236
src = quartoSrc;
243-
hash = "sha256-9ObJ3fzxPyGVfIgBj4BhCWqkrG1A2JqZsCreJA+1fWQ=";
237+
hash = "sha256-XRxClyAaz3ja+Tr97aoqVxKhWOxezZ6OmEPGILdeOww=";
244238
};
245239

246240
dontYarnInstallDeps = true; # will call manually in preConfigure
@@ -256,7 +250,7 @@ stdenv.mkDerivation rec {
256250
name = "rstudio-${version}-npm-deps";
257251
inherit src;
258252
postPatch = "cd ${npmRoot}";
259-
hash = "sha256-/5GgRusDRyBMr5581ypTMzhqkvjpzYBaniFos524bEw=";
253+
hash = "sha256-7gXLCFhan/TCTlc2okMWuWzfRYXmuwcqhmGKAqJOEM0=";
260254
};
261255

262256
preConfigure = ''
@@ -290,10 +284,14 @@ stdenv.mkDerivation rec {
290284
# version in dependencies/common/install-mathjax
291285
ln -s ${mathJaxSrc} dependencies/mathjax-27
292286
287+
# node used by cmake and node used for distribution
288+
# version in cmake/globals.cmake
289+
RSTUDIO_NODE_VERSION="22.13.1"
290+
RSTUDIO_INSTALLED_NODE_VERSION="22.21.1"
291+
293292
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
293+
ln -s ${nodejs} dependencies/common/node/$RSTUDIO_NODE_VERSION
294+
ln -s ${nodejs} dependencies/common/node/$RSTUDIO_INSTALLED_NODE_VERSION-installed
297295
298296
''
299297
+ lib.optionalString (!server) ''
@@ -320,11 +318,6 @@ stdenv.mkDerivation rec {
320318
substituteInPlace node_modules/@electron/packager/dist/packager.js \
321319
--replace-fail "await this.getElectronZipPath(downloadOpts)" "'$(pwd)/electron.zip'"
322320
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-
328321
# now that we patched everything, we still have to run the scripts we ignored with --ignore-scripts
329322
npm rebuild
330323
@@ -335,7 +328,7 @@ stdenv.mkDerivation rec {
335328
mkdir -p $out/bin
336329
''
337330
+ 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
331+
ln -s $out/lib/rstudio/bin/{postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin
339332
''
340333
+ lib.optionalString (!server && stdenv.hostPlatform.isLinux) ''
341334
# remove unneeded electron files, since we'll wrap the app with our own electron
@@ -350,7 +343,7 @@ stdenv.mkDerivation rec {
350343
ln -s $out/lib/rstudio/resources/app/bin/{diagnostics,rpostback} $out/bin
351344
''
352345
+ 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
346+
ln -s $out/Applications/RStudio.app/Contents/MacOS/{postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin
354347
''
355348
+ lib.optionalString (!server && stdenv.hostPlatform.isDarwin) ''
356349
# electron can't find its files if we use a symlink here

0 commit comments

Comments
 (0)