From bc42fc0684e568768575a095894b2954da845c6a Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 7 Jun 2025 18:17:19 +0200 Subject: [PATCH 1/3] rstudio: 2025.05.0+496 -> 2025.05.1+513, unlock jdk version --- pkgs/applications/editors/rstudio/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 8ba7f9df78f54..89fb17197e4a3 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -79,13 +79,13 @@ let in stdenv.mkDerivation rec { pname = "RStudio"; - version = "2025.05.0+496"; + version = "2025.05.1+513"; src = fetchFromGitHub { owner = "rstudio"; repo = "rstudio"; tag = "v${version}"; - hash = "sha256-yZy/fEYln/jGxErwJiWFgr9w0GvwtMwzpmmHf71chBQ="; + hash = "sha256-KaolU82bxzAlYl+aYwlFljqsmNv0dn8XP1llaLK3LQE="; }; # sources fetched into _deps via cmake's FetchContent diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9465ef1cb5d85..a809497a65de7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13875,9 +13875,7 @@ with pkgs; backend = "wayland"; }; - rstudio = callPackage ../applications/editors/rstudio { - jdk = jdk8; - }; + rstudio = callPackage ../applications/editors/rstudio { }; rstudio-server = rstudio.override { server = true; }; From 77e50143bbbbc3bdbd4dc2197f563fe59a7f92e5 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 7 Jun 2025 18:26:52 +0200 Subject: [PATCH 2/3] rstudio: do minor cleanup --- pkgs/applications/editors/rstudio/default.nix | 96 +++++++++---------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 89fb17197e4a3..758428d1f05af 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -224,7 +224,7 @@ stdenv.mkDerivation rec { ''; yarnOfflineCache = fetchYarnDeps { - yarnLock = quartoSrc + "/yarn.lock"; + src = quartoSrc; hash = "sha256-F+gqVNNhLmyrC+tJuElw7cpx5z/WLHOiYow/y86KR5c="; }; @@ -244,41 +244,43 @@ stdenv.mkDerivation rec { hash = "sha256-ispV6FJdtOELtFNIZDn1lKbwvO/iTO8mrZ8nIOs2uhs="; }; - preConfigure = '' - # populate the directories used by cmake's FetchContent - mkdir -p build/_deps - cp -r "$extSrcs"/* build/_deps - chmod -R u+w build/_deps - - # set up node_modules directory inside quarto so that panmirror can be built - mkdir src/gwt/lib/quarto - cp -r --no-preserve=all ${quartoSrc}/* src/gwt/lib/quarto - pushd src/gwt/lib/quarto - yarnConfigHook - popd - - ### set up dependencies that will be copied into the result - # note: only the directory names have to match upstream, the actual versions don't - # note: symlinks are preserved - - mkdir dependencies/dictionaries - for dict in ${builtins.concatStringsSep " " dictionaries}; do - for i in "$dict/share/hunspell/"*; do - ln -s $i dependencies/dictionaries/ + preConfigure = + '' + # populate the directories used by cmake's FetchContent + mkdir -p build/_deps + cp -r "$extSrcs"/* build/_deps + chmod -R u+w build/_deps + + # set up node_modules directory inside quarto so that panmirror can be built + mkdir src/gwt/lib/quarto + cp -r --no-preserve=all ${quartoSrc}/* src/gwt/lib/quarto + pushd src/gwt/lib/quarto + yarnConfigHook + popd + + ### set up dependencies that will be copied into the result + # note: only the directory names have to match upstream, the actual versions don't + # note: symlinks are preserved + + mkdir dependencies/dictionaries + for dict in ${builtins.concatStringsSep " " dictionaries}; do + for i in "$dict/share/hunspell/"*; do + ln -s $i dependencies/dictionaries/ + done done - done - ln -s ${quartoWrapper} dependencies/quarto + ln -s ${quartoWrapper} dependencies/quarto - # version in dependencies/common/install-mathjax - ln -s ${mathJaxSrc} dependencies/mathjax-27 + # version in dependencies/common/install-mathjax + ln -s ${mathJaxSrc} dependencies/mathjax-27 - mkdir -p dependencies/common/node - # node used by cmake - # version in cmake/globals.cmake (RSTUDIO_NODE_VERSION) - ln -s ${nodejs} dependencies/common/node/22.13.1 + mkdir -p dependencies/common/node + # node used by cmake + # version in cmake/globals.cmake (RSTUDIO_NODE_VERSION) + ln -s ${nodejs} dependencies/common/node/22.13.1 - ${lib.optionalString (!server) '' + '' + + lib.optionalString (!server) '' pushd $npmRoot substituteInPlace package.json \ @@ -308,23 +310,22 @@ stdenv.mkDerivation rec { # Work around known nan issue for electron_33 and above # https://github.com/nodejs/nan/issues/978 substituteInPlace node_modules/nan/nan.h \ - --replace-fail '#include "nan_scriptorigin.h"' "" + --replace-fail '#include "nan_scriptorigin.h"' "" # now that we patched everything, we still have to run the scripts we ignored with --ignore-scripts npm rebuild popd - ''} - ''; - - postInstall = '' - mkdir -p $out/bin + ''; - ${lib.optionalString (server && stdenv.hostPlatform.isLinux) '' + postInstall = + '' + mkdir -p $out/bin + '' + + lib.optionalString (server && stdenv.hostPlatform.isLinux) '' ln -s $out/lib/rstudio/bin/{crash-handler-proxy,postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin - ''} - - ${lib.optionalString (!server && stdenv.hostPlatform.isLinux) '' + '' + + lib.optionalString (!server && stdenv.hostPlatform.isLinux) '' # remove unneeded electron files, since we'll wrap the app with our own electron shopt -s extglob rm -r $out/lib/rstudio/!(locales|resources|resources.pak) @@ -335,19 +336,16 @@ stdenv.mkDerivation rec { --suffix PATH : ${lib.makeBinPath [ gnumake ]} ln -s $out/lib/rstudio/resources/app/bin/{diagnostics,rpostback} $out/bin - ''} - - ${lib.optionalString (server && stdenv.hostPlatform.isDarwin) '' + '' + + lib.optionalString (server && stdenv.hostPlatform.isDarwin) '' ln -s $out/Applications/RStudio.app/Contents/MacOS/{crash-handler-proxy,postback,r-ldpath,rpostback,rserver,rserver-pam,rsession,rstudio-server} $out/bin - ''} - - ${lib.optionalString (!server && stdenv.hostPlatform.isDarwin) '' + '' + + lib.optionalString (!server && stdenv.hostPlatform.isDarwin) '' # electron can't find its files if we use a symlink here makeWrapper $out/Applications/RStudio.app/Contents/MacOS/RStudio $out/bin/rstudio ln -s $out/Applications/RStudio.app/Contents/Resources/app/bin/{diagnostics,rpostback} $out/bin - ''} - ''; + ''; passthru = { inherit server; From c700de3abb18a4d348eeec207e23aa403472ae1b Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 7 Jun 2025 19:05:48 +0200 Subject: [PATCH 3/3] rstudio: move to pkgs/by-name --- .../editors => by-name/rs}/rstudio/clang-location.patch | 0 .../editors => by-name/rs}/rstudio/dont-yarn-install.patch | 0 .../editors => by-name/rs}/rstudio/fix-darwin.patch | 0 .../editors => by-name/rs}/rstudio/ignore-etc-os-release.patch | 0 .../rstudio/default.nix => by-name/rs/rstudio/package.nix} | 0 .../editors => by-name/rs}/rstudio/r-location.patch | 0 pkgs/top-level/all-packages.nix | 2 -- 7 files changed, 2 deletions(-) rename pkgs/{applications/editors => by-name/rs}/rstudio/clang-location.patch (100%) rename pkgs/{applications/editors => by-name/rs}/rstudio/dont-yarn-install.patch (100%) rename pkgs/{applications/editors => by-name/rs}/rstudio/fix-darwin.patch (100%) rename pkgs/{applications/editors => by-name/rs}/rstudio/ignore-etc-os-release.patch (100%) rename pkgs/{applications/editors/rstudio/default.nix => by-name/rs/rstudio/package.nix} (100%) rename pkgs/{applications/editors => by-name/rs}/rstudio/r-location.patch (100%) diff --git a/pkgs/applications/editors/rstudio/clang-location.patch b/pkgs/by-name/rs/rstudio/clang-location.patch similarity index 100% rename from pkgs/applications/editors/rstudio/clang-location.patch rename to pkgs/by-name/rs/rstudio/clang-location.patch diff --git a/pkgs/applications/editors/rstudio/dont-yarn-install.patch b/pkgs/by-name/rs/rstudio/dont-yarn-install.patch similarity index 100% rename from pkgs/applications/editors/rstudio/dont-yarn-install.patch rename to pkgs/by-name/rs/rstudio/dont-yarn-install.patch diff --git a/pkgs/applications/editors/rstudio/fix-darwin.patch b/pkgs/by-name/rs/rstudio/fix-darwin.patch similarity index 100% rename from pkgs/applications/editors/rstudio/fix-darwin.patch rename to pkgs/by-name/rs/rstudio/fix-darwin.patch diff --git a/pkgs/applications/editors/rstudio/ignore-etc-os-release.patch b/pkgs/by-name/rs/rstudio/ignore-etc-os-release.patch similarity index 100% rename from pkgs/applications/editors/rstudio/ignore-etc-os-release.patch rename to pkgs/by-name/rs/rstudio/ignore-etc-os-release.patch diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/by-name/rs/rstudio/package.nix similarity index 100% rename from pkgs/applications/editors/rstudio/default.nix rename to pkgs/by-name/rs/rstudio/package.nix diff --git a/pkgs/applications/editors/rstudio/r-location.patch b/pkgs/by-name/rs/rstudio/r-location.patch similarity index 100% rename from pkgs/applications/editors/rstudio/r-location.patch rename to pkgs/by-name/rs/rstudio/r-location.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a809497a65de7..6c1746fb26ffb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13875,8 +13875,6 @@ with pkgs; backend = "wayland"; }; - rstudio = callPackage ../applications/editors/rstudio { }; - rstudio-server = rstudio.override { server = true; }; rsync = callPackage ../applications/networking/sync/rsync (config.rsync or { });