Skip to content

Commit

Permalink
quarto: use pandoc 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
detroyejr committed Nov 21, 2024
1 parent 49bd2e2 commit 3f81343
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion pkgs/development/libraries/quarto/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{ stdenv
, lib
, pandoc
, typst
, esbuild
, deno
, fetchurl
, haskell
, haskellPackages
, dart-sass
, rWrapper
, rPackages
Expand All @@ -15,8 +16,40 @@
, quarto
, extraPythonPackages ? ps: []
, sysctl
, removeReferencesTo
, installShellFiles
}:
let
pandoc_3_5 = lib.lists.elemAt (lib.lists.filter (x: x.name or "" == "pandoc-3.5") static.buildInputs) 0;
static = haskell.lib.compose.justStaticExecutables haskellPackages.pandoc-cli_3_5;
pandoc = (haskell.lib.compose.overrideCabal (drv: {
configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"];
buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed];
buildTools = (drv.buildTools or []) ++ [
removeReferencesTo
installShellFiles
];

postInstall = drv.postInstall or "" + ''
remove-references-to \
-t ${haskellPackages.pandoc-types} \
$out/bin/pandoc
remove-references-to \
-t ${haskellPackages.warp} \
$out/bin/pandoc
remove-references-to \
-t ${pandoc_3_5} \
$out/bin/pandoc
'' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) ''
mkdir -p $out/share/bash-completion/completions
$out/bin/pandoc --bash-completion > $out/share/bash-completion/completions/pandoc
'' + ''
installManPage man/*
'';
}) static).overrideAttrs (drv: {
disallowedReferences = [ haskellPackages.pandoc-types haskellPackages.warp haskellPackages.pandoc pandoc_3_5 ];
});
in
stdenv.mkDerivation (final: {
pname = "quarto";
version = "1.6.33";
Expand Down

0 comments on commit 3f81343

Please sign in to comment.