push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,122 @@
{
stdenv,
lib,
pandoc,
typst,
esbuild,
deno,
fetchurl,
dart-sass,
rWrapper,
rPackages,
extraRPackages ? [ ],
makeWrapper,
runCommand,
python3,
quarto,
extraPythonPackages ? ps: [ ],
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.34";
src = fetchurl {
url = "https://github.com/quarto-dev/quarto-cli/releases/download/v${final.version}/quarto-${final.version}-linux-amd64.tar.gz";
hash = "sha256-3WsDCkS5Y9AflLlpa6y6ca/DF4621RqcwQUzK3fqa5o=";
};
patches = [
./deno2.patch
];
nativeBuildInputs = [
makeWrapper
which
];
dontStrip = true;
preFixup = ''
wrapProgram $out/bin/quarto \
--set-default QUARTO_DENO ${lib.getExe deno} \
--set-default QUARTO_PANDOC ${lib.getExe pandoc} \
--set-default QUARTO_ESBUILD ${lib.getExe esbuild} \
--set-default QUARTO_DART_SASS ${lib.getExe dart-sass} \
--set-default QUARTO_TYPST ${lib.getExe typst} \
${lib.optionalString (rWrapper != null) "--set-default QUARTO_R ${rWithPackages}/bin/R"} \
${
lib.optionalString (python3 != null) "--set-default QUARTO_PYTHON ${pythonWithPackages}/bin/python3"
} \
${lib.optionalString (
rWrapper != null
) "--set-default RETICULATE_PYTHON ${pythonWithPackages.interpreter}"}
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
rm -r bin/tools
mv bin/* $out/bin
mv share/* $out/share
runHook postInstall
'';
passthru.tests = {
quarto-check =
runCommand "quarto-check"
{
nativeBuildInputs = [ which ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ sysctl ];
}
''
export HOME="$(mktemp -d)"
${quarto}/bin/quarto check
touch $out
'';
};
meta = {
description = "Open-source scientific and technical publishing system built on Pandoc";
mainProgram = "quarto";
longDescription = ''
Quarto is an open-source scientific and technical publishing system built on Pandoc.
Quarto documents are authored using markdown, an easy to write plain text format.
'';
homepage = "https://quarto.org/";
changelog = "https://github.com/quarto-dev/quarto-cli/releases/tag/v${final.version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
minijackson
mrtarantoga
];
platforms = lib.platforms.all;
sourceProvenance = with lib.sourceTypes; [
binaryNativeCode
binaryBytecode
];
};
})

View File

@@ -0,0 +1,59 @@
diff --git a/bin/quarto.js b/bin/quarto.js
@@ -97360,6 +97360,7 @@
class SAXParser extends ParserBase {
_listeners = {};
_controller;
+ _encoding;
fireListeners(event) {
const [name, ...args] = event;
const list = this._listeners[name] || [];
@@ -97395,33 +97396,23 @@
write(chunk, controller) {
try {
this._controller = controller;
- this.chunk = new TextDecoder().decode(chunk);
+ this.chunk = new TextDecoder(this._encoding).decode(chunk);
this.run();
} finally{
this._controller = undefined;
}
}
- getStream() {
- return new WritableStream(this);
- }
- getWriter() {
- const streamWriter = this.getStream().getWriter();
- return {
- async write (p) {
- await streamWriter.ready;
- await streamWriter.write(p);
- return p.length;
- }
- };
- }
- async parse(source) {
+ async parse(source, encoding) {
+ this._encoding = encoding;
if (typeof source === 'string') {
this.chunk = source;
this.run();
} else if (source instanceof Uint8Array) {
this.write(source);
} else {
- await Deno.copy(source, this.getWriter());
+ await source.pipeThrough(new TextDecoderStream(this._encoding)).pipeTo(new WritableStream({
+ write: (str)=>this.parse(str, encoding)
+ }));
}
}
on(event, listener) {
@@ -97532,8 +97523,7 @@
}
});
const reader = await Deno.open(sitemapPath);
- await parser.parse(reader);
- reader.close();
+ await parser.parse(reader.readable);
return urlset;
}
function writeSitemap(sitemapPath, urlset, draftMode) {