summary refs log tree commit diff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2023-10-09 09:20:18 +1100
committerJustin Bedo <cu@cua0.org>2023-10-09 09:20:18 +1100
commit45b1d202eff8fad701bba815cdfc30dea79b91f3 (patch)
tree9c31f4178fa8acc2ccfa6cf39e36e565cbfe9636
parenta12a3714b7e23a199b53cf3f60296c30b5e09150 (diff)
downloadnixpkgs-45b1d202eff8fad701bba815cdfc30dea79b91f3.tar
nixpkgs-45b1d202eff8fad701bba815cdfc30dea79b91f3.tar.gz
nixpkgs-45b1d202eff8fad701bba815cdfc30dea79b91f3.tar.bz2
nixpkgs-45b1d202eff8fad701bba815cdfc30dea79b91f3.tar.lz
nixpkgs-45b1d202eff8fad701bba815cdfc30dea79b91f3.tar.xz
nixpkgs-45b1d202eff8fad701bba815cdfc30dea79b91f3.tar.zst
nixpkgs-45b1d202eff8fad701bba815cdfc30dea79b91f3.zip
rstudio: fix server node patching
-rw-r--r--pkgs/applications/editors/rstudio/default.nix3
-rw-r--r--pkgs/applications/editors/rstudio/use-system-node.patch30
2 files changed, 32 insertions, 1 deletions
diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix
index 2ce482f356c..82a572eaf4c 100644
--- a/pkgs/applications/editors/rstudio/default.nix
+++ b/pkgs/applications/editors/rstudio/default.nix
@@ -145,6 +145,9 @@ in
         --replace '@node@' ${nodejs} \
         --replace './lib/quarto' ${quartoSrc}
 
+      substituteInPlace src/cpp/conf/rsession-dev.conf \
+        --replace '@node@' ${nodejs}
+
       substituteInPlace src/cpp/core/libclang/LibClang.cpp \
         --replace '@libclang@' ${llvmPackages.libclang.lib} \
         --replace '@libclang.so@' ${llvmPackages.libclang.lib}/lib/libclang.so
diff --git a/pkgs/applications/editors/rstudio/use-system-node.patch b/pkgs/applications/editors/rstudio/use-system-node.patch
index 85934909613..bb4480b4ae5 100644
--- a/pkgs/applications/editors/rstudio/use-system-node.patch
+++ b/pkgs/applications/editors/rstudio/use-system-node.patch
@@ -1,5 +1,33 @@
+diff --git a/src/cpp/conf/rsession-dev.conf b/src/cpp/conf/rsession-dev.conf
+index d18362b..98cdd4c 100644
+--- a/src/cpp/conf/rsession-dev.conf
++++ b/src/cpp/conf/rsession-dev.conf
+@@ -39,7 +39,7 @@ external-mathjax-path=${RSTUDIO_DEPENDENCIES_MATHJAX_DIR}
+ external-pandoc-path=${RSTUDIO_DEPENDENCIES_PANDOC_DIR}
+ external-quarto-path=${RSTUDIO_DEPENDENCIES_QUARTO_DIR}
+ external-libclang-path=${RSTUDIO_DEPENDENCIES_DIR}/common/libclang
+-external-node-path=${RSTUDIO_DEPENDENCIES_DIR}/common/node/16.14.0/bin/node
++external-node-path=@node@/bin/node
+ 
+ # enable copilot
+ copilot-enabled=1
+diff --git a/src/cpp/server/CMakeLists.txt b/src/cpp/server/CMakeLists.txt
+index 30dd638..cb4a645 100644
+--- a/src/cpp/server/CMakeLists.txt
++++ b/src/cpp/server/CMakeLists.txt
+@@ -250,10 +250,6 @@ if (UNIX AND NOT APPLE)
+            DESTINATION ${RSERVER_SYSTEMD_DIR})
+ 
+    # install node
+-   install(
+-      DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/node/${RSTUDIO_NODE_VERSION}/"
+-      DESTINATION "${RSTUDIO_INSTALL_BIN}/node"
+-      USE_SOURCE_PERMISSIONS)
+ 
+ elseif(APPLE)
+ 
 diff --git a/src/gwt/build.xml b/src/gwt/build.xml
-index 83e9433..f1ee63d 100644
+index 033d605..f1ee63d 100644
 --- a/src/gwt/build.xml
 +++ b/src/gwt/build.xml
 @@ -87,29 +87,7 @@