quarto: use --set instead of --prefix (#384080)

This commit is contained in:
Toma
2025-05-14 02:01:13 +02:00
committed by GitHub
+25 -24
View File
@@ -18,6 +18,24 @@
sysctl,
which,
}:
let
rWithPackages = rWrapper.override {
packages = [
rPackages.rmarkdown
] ++ extraRPackages;
};
pythonWithPackages = python3.withPackages (
ps:
with ps;
[
jupyter
ipython
]
++ (extraPythonPackages ps)
);
in
stdenv.mkDerivation (final: {
pname = "quarto";
version = "1.7.30";
@@ -40,30 +58,13 @@ stdenv.mkDerivation (final: {
preFixup = ''
wrapProgram $out/bin/quarto \
--prefix QUARTO_DENO : ${lib.getExe deno} \
--prefix QUARTO_PANDOC : ${lib.getExe pandoc} \
--prefix QUARTO_ESBUILD : ${lib.getExe esbuild} \
--prefix QUARTO_DART_SASS : ${lib.getExe dart-sass} \
--prefix QUARTO_TYPST : ${lib.getExe typst} \
${
lib.optionalString (rWrapper != null)
"--prefix QUARTO_R : ${
rWrapper.override { packages = [ rPackages.rmarkdown ] ++ extraRPackages; }
}/bin/R"
} \
${lib.optionalString (python3 != null)
"--prefix QUARTO_PYTHON : ${
python3.withPackages (
ps:
with ps;
[
jupyter
ipython
]
++ (extraPythonPackages ps)
)
}/bin/python3"
}
--set QUARTO_DENO ${lib.getExe deno} \
--set QUARTO_PANDOC ${lib.getExe pandoc} \
--set QUARTO_ESBUILD ${lib.getExe esbuild} \
--set QUARTO_DART_SASS ${lib.getExe dart-sass} \
--set QUARTO_TYPST ${lib.getExe typst} \
${lib.optionalString (rWrapper != null) "--set QUARTO_R ${rWithPackages}/bin/R"} \
${lib.optionalString (python3 != null) "--set QUARTO_PYTHON ${pythonWithPackages}/bin/python3"}
'';
installPhase = ''