depot/third_party/nixpkgs/pkgs/applications/editors/rstudio/use-system-node.patch
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

60 lines
2.7 KiB
Diff

diff --git a/src/gwt/build.xml b/src/gwt/build.xml
index 83e9433..f1ee63d 100644
--- a/src/gwt/build.xml
+++ b/src/gwt/build.xml
@@ -87,29 +87,7 @@
<!-- ensure version matches RSTUDIO_NODE_VERSION -->
<property name="node.version" value="16.14.0"/>
<property name="node.dir" value="../../dependencies/common/node/${node.version}"/>
- <!-- use yarn from system but will prefer yarn from dependencies if available -->
- <condition property="yarn.bin" value="yarn">
- <not>
- <os family="windows" />
- </not>
- </condition>
- <available
- property="yarn.bin"
- value="${node.dir}/bin/yarn"
- file="${node.dir}/bin/yarn"/>
- <condition property="yarn.bin" value="${node.dir}/node_modules/yarn/bin/yarn.cmd">
- <os family="windows" />
- </condition>
- <!-- use yarn from /opt/rstudio-tools if installed (typical for Docker) -->
- <available
- property="yarn.bin"
- value="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/yarn"
- file="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/yarn"/>
- <!-- use yarn from c:/rstudio-tools if installed (typical for Docker on Windows) -->
- <available
- property="yarn.bin"
- value="c:\rstudio-tools\dependencies\common\node\${node.version}\node_modules\yarn\bin\yarn.cmd"
- file="c:\rstudio-tools\dependencies\common\node\${node.version}\node_modules\yarn\bin\yarn.cmd"/>
+ <property name="node.bin" value="@node@/bin/node"/>
<property name="panmirror.dir" value="./lib/quarto/apps/panmirror"/>
<property name="panmirror.build.dir" value="./www/js/panmirror"/>
@@ -126,21 +104,11 @@
file="c:\rstudio-tools\src\gwt\lib\quarto\apps\panmirror"/>
<target name="panmirror" description="Compile panmirror library">
- <echo message="yarn location: ${yarn.bin}"/>
- <echo message="panmirror location: ${panmirror.dir}"/>
<mkdir dir="${panmirror.build.dir}"/>
- <exec executable="${yarn.bin}" dir="${panmirror.dir}" resolveexecutable="true" failonerror="true">
- <arg value="install"/>
- <arg value="--network-timeout"/>
- <arg value="240000"/>
- </exec>
- <exec executable="${yarn.bin}" dir="${panmirror.dir}" resolveexecutable="true" failonerror="true">
- <arg value="build"/>
- <env key="PANMIRROR_OUTDIR" value="dist-rstudio"/>
+ <exec executable="${node.bin}" dir="${panmirror.dir}" spawn="${panmirror.spawn}">
+ <arg value="fuse"/>
+ <arg value="${panmirror.target}"/>
</exec>
- <copy todir="${panmirror.build.dir}">
- <fileset dir="${panmirror.dir}/dist-rstudio"/>
- </copy>
</target>
<target name="javac" description="Compile java source">