Skip to content

Conversation

@TomaSajt
Copy link
Contributor

@TomaSajt TomaSajt commented Jan 7, 2026

https://github.com/rstudio/rstudio/blob/v2026.01.0%2B392/version/news/NEWS-2026.01.0-apple-blossom.md

Luckily I could get rid of some previous workarounds.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@TomaSajt TomaSajt requested review from Kupac and b-rodrigues January 7, 2026 01:09
@nixpkgs-ci nixpkgs-ci bot requested a review from ciil January 7, 2026 01:14
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". labels Jan 7, 2026
@b-rodrigues
Copy link
Contributor

Getting the following on aarch64-darwin:

error: Cannot build '/nix/store/xc1i6kgpgr81vzgy9vdn3hqj2wsf4b47-RStudio-2026.01.0+392.drv'.
       Reason: builder failed with exit code 2.
       Output paths:
         /nix/store/ldlmsdm4mac84y9dqhf8iib32ma39qqz-RStudio-2026.01.0+392
       Last 25 log lines:
       > [ 48%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsErrorCategory.cpp.o
       > [ 48%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/system/Win32PtyTests.cpp.o
       > [ 48%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsPlot.cpp.o
       > [ 48%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsPlotManipulator.cpp.o
       > [ 50%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsPlotManipulatorManager.cpp.o
       > [ 50%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/system/Win32SystemTests.cpp.o
       > [ 50%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsPlotManager.cpp.o
       > [ 50%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/system/XdgTests.cpp.o
       > [ 50%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/system/encryption/EncryptionTests.cpp.o
       > [ 51%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/terminal/PrivateCommandTests.cpp.o
       > [ 51%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/text/AnsiCodeParserTests.cpp.o
       > [ 51%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsUtils.cpp.o
       > [ 51%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsDevDesc.cpp.o
       > [ 51%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RGraphicsHandler.cpp.o
       > [ 51%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/graphics/RShadowPngGraphicsHandler.cpp.o
       > [ 51%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/text/DcfParserTests.cpp.o
       > [ 51%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/session/REmbeddedPosix.cpp.o
       > [ 51%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/text/TermBufferParserTests.cpp.o
       > [ 51%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core-tests.dir/text/TextCursorTests.cpp.o
       > [ 51%] Linking CXX executable rstudio-core-tests
       > ld: warning: directory not found for option '-L/nix/var/nix/builds/nix-782-1800531510/source/HOMEBREW_PREFIX-NOTFOUND/opt/icu4c/lib'
       > [ 51%] Built target rstudio-core-tests
       > [ 52%] Linking CXX static library librstudio-r.a
       > [ 52%] Built target rstudio-r
       > make: *** [Makefile:156: all] Error 2
       For full logs, run:
         nix log /nix/store/xc1i6kgpgr81vzgy9vdn3hqj2wsf4b47-RStudio-2026.01.0+392.drv

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Jan 7, 2026

Pushed a new commit, hopefully it's fixed.

@b-rodrigues
Copy link
Contributor

Getting this now, no idea what it comes from

[ 42%] Linking CXX executable rpostback
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_NSNumber", referenced from:
      objc-class-ref in librstudio-core.a(Keychain.mm.o)
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/cpp/session/postback/CMakeFiles/rpostback.dir/build.make:140: src/cpp/session/postback/rpostback] Error 1
make[1]: *** [CMakeFiles/Makefile2:1634: src/cpp/session/postback/CMakeFiles/rpostback.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

@b-rodrigues
Copy link
Contributor

A dependency, python313Packages.uvloop fails to build:

error: Cannot build '/nix/store/d57kas464ywngqd47fqjgm16ri8r2nad-python3.13-uvloop-0.22.0.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/b5vwqpgplv9c49j13srw40snqx86xzdp-python3.13-uvloop-0.22.0
         /nix/store/biyc2dfc3f4yf83chmncjlypdbd3acv7-python3.13-uvloop-0.22.0-dist
       Last 25 log lines:
       > tests/test_unix.py ..............s.s.................
       >
       > =================================== FAILURES ===================================
       > ________________ TestAsyncio_AIO_Process.test_cancel_post_init _________________
       > Traceback (most recent call last):
       >   File "/nix/store/48ak878425b9wyrkwd826d2043m3ii36-python3-3.13.11/lib/python3.13/unittest/case.py", line 58, in testPartExecutor
       >     yield
       >   File "/nix/store/48ak878425b9wyrkwd826d2043m3ii36-python3-3.13.11/lib/python3.13/unittest/case.py", line 654, in run
       >     self._callTearDown()
       >     ~~~~~~~~~~~~~~~~~~^^
       >   File "/nix/store/48ak878425b9wyrkwd826d2043m3ii36-python3-3.13.11/lib/python3.13/unittest/case.py", line 611, in _callTearDown
       >     self.tearDown()
       >     ~~~~~~~~~~~~~^^
       >   File "/nix/store/b5vwqpgplv9c49j13srw40snqx86xzdp-python3.13-uvloop-0.22.0/lib/python3.13/site-packages/uvloop/_testbase.py", line 327, in tearDown
       >     super().tearDown()
       >     ~~~~~~~~~~~~~~~~^^
       >   File "/nix/store/b5vwqpgplv9c49j13srw40snqx86xzdp-python3.13-uvloop-0.22.0/lib/python3.13/site-packages/uvloop/_testbase.py", line 106, in tearDown
       >     self.fail('unexpected calls to loop.call_exception_handler()')
       >     ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/48ak878425b9wyrkwd826d2043m3ii36-python3-3.13.11/lib/python3.13/unittest/case.py", line 732, in fail
       >     raise self.failureException(msg)
       > AssertionError: unexpected calls to loop.call_exception_handler()
       > =========================== short test summary info ============================
       > FAILED tests/test_process.py::TestAsyncio_AIO_Process::test_cancel_post_init - AssertionError: unexpected calls to loop.call_exception_handler()
       > ====== 1 failed, 405 passed, 39 skipped, 8 deselected in 98.98s (0:01:38) ======

but it builds successfully from master. Maybe you need to rebase?

@TomaSajt TomaSajt force-pushed the rstudio branch 2 times, most recently from ce0f708 to 3c18871 Compare January 8, 2026 14:34
@b-rodrigues
Copy link
Contributor

Got it working with

diff --git a/pkgs/by-name/rs/rstudio/package.nix b/pkgs/by-name/rs/rstudio/package.nix
index b4be87ee366f..99cad160ef41 100644
--- a/pkgs/by-name/rs/rstudio/package.nix
+++ b/pkgs/by-name/rs/rstudio/package.nix
@@ -191,7 +191,8 @@ stdenv.mkDerivation rec {
     ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
 
     # on Darwin, cmake uses find_library to locate R instead of using the PATH
-    NIX_LDFLAGS = "-L${R}/lib/R/lib";
+    # Also add Foundation framework for Objective-C code in Keychain.mm
+    NIX_LDFLAGS = "-L${R}/lib/R/lib" + lib.optionalString stdenv.hostPlatform.isDarwin " -framework Foundation";
 
     RSTUDIO_VERSION_MAJOR = lib.versions.major version;
     RSTUDIO_VERSION_MINOR = lib.versions.minor version;
bash: warning: setlocale: LC_COLLATE: cannot change locale (): No such file or directory

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Jan 8, 2026

Yup, I think I also figured it out.
Probably a result of rstudio/rstudio#16336

Copy link
Contributor

@b-rodrigues b-rodrigues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on aarch64-darwin!

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 8, 2026
Copy link
Contributor

@Kupac Kupac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds and works on x86_64-linux. Both rstudio and rstudioServer. LGTM!

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Jan 8, 2026
@TomaSajt TomaSajt added this pull request to the merge queue Jan 8, 2026
Merged via the queue into NixOS:master with commit b511a4d Jan 8, 2026
30 of 34 checks passed
@TomaSajt TomaSajt deleted the rstudio branch January 8, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants