Fix not FHS paths

Create explicit nix path replacement of hard coded FHS paths for pandoc and nodejs.
This commit is contained in:
Goetz
2022-06-17 13:10:03 +02:00
parent c758d73537
commit f4c5c86fbb
3 changed files with 15 additions and 3 deletions

View File

@@ -128,6 +128,7 @@ in
./clang-location.patch
./use-system-node.patch
./fix-resources-path.patch
./pandoc-nix-path.patch
];
postPatch = ''
@@ -137,14 +138,14 @@ in
--replace 'SOCI_LIBRARY_DIR "/usr/lib"' 'SOCI_LIBRARY_DIR "${soci}/lib"'
substituteInPlace src/gwt/build.xml \
--replace '/usr/bin/node' '${nodejs}/bin/node'
--replace '@node@' ${nodejs}
substituteInPlace src/cpp/core/libclang/LibClang.cpp \
--replace '@libclang@' ${llvmPackages.libclang.lib} \
--replace '@libclang.so@' ${llvmPackages.libclang.lib}/lib/libclang.so
substituteInPlace src/cpp/session/include/session/SessionConstants.hpp \
--replace "bin/pandoc" "${pandoc}/bin/pandoc"
--replace '@pandoc@' ${pandoc}/bin/pandoc
'';
hunspellDictionaries = with lib; filter isDerivation (unique (attrValues hunspellDicts));

View File

@@ -0,0 +1,11 @@
--- a/src/cpp/session/include/session/SessionConstants.hpp
+++ b/src/cpp/session/include/session/SessionConstants.hpp
@@ -140,7 +140,7 @@
#ifdef QUARTO_ENABLED
# define kDefaultPandocPath "bin/quarto/bin"
#else
-# define kDefaultPandocPath "bin/pandoc"
+# define kDefaultPandocPath "@pandoc@"
#endif
#define kDefaultQuartoPath "bin/quarto"

View File

@@ -21,7 +21,7 @@
- property="node.bin"
- value="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/node"
- file="/opt/rstudio-tools/dependencies/common/node/${node.version}/bin/node"/>
+ <property name="node.bin" value="/usr/bin/node"/>
+ <property name="node.bin" value="@node@/bin/node"/>
<property name="panmirror.dir" value="./panmirror/src/editor"/>
<property name="panmirror.build.dir" value="./www/js/panmirror"/>