Skip to content

Commit

Permalink
haskellPackages.pandoc-cli_3_5: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
detroyejr committed Nov 21, 2024
1 parent 2468db7 commit 1b85957
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,53 @@ self: super: {
)
];

# Pandoc 3.5 improves the quality of PDF rendering in Quarto >=1.6.30.
# https://github.com/NixOS/nixpkgs/pull/349683
pandoc-cli_3_5 =
let
overrides = self: super: {
doclayout = self.doclayout_0_5;
pandoc = self.pandoc_3_5;
pandoc-lua-engine = self.pandoc-lua-engine_0_3_3.overrideScope (
self: super: {
hslua-module-doclayout = self.hslua-module-doclayout_1_2_0;
lpeg = self.lpeg_1_1_0;
}
);
pandoc-server = self.pandoc-server_0_1_0_9;
texmath = self.texmath_0_12_8_11;
tls = self.tls_2_0_6;
toml-parser = self.toml-parser_2_0_1_0;
typst = self.typst_0_6;
typst-symbols = self.typst-symbols_0_1_6;
};
pandoc-cli_3_5 = super.pandoc-cli_3_5.overrideScope overrides;
pandoc_3_5 = super.pandoc_3_5.overrideScope overrides;
in
lib.pipe pandoc-cli_3_5 [
justStaticExecutables
(overrideCabal (drv: {
configureFlags = drv.configureFlags or [ ] ++ [ "-fembed_data_files" ];
buildDepends = drv.buildDepends or [ ] ++ [ self.file-embed ];
buildTools = (drv.buildTools or [ ]) ++ [
pkgs.removeReferencesTo
pkgs.installShellFiles
];

postInstall =
drv.postInstall or ""
+ ''
remove-references-to -t ${super.pandoc-types} $out/bin/pandoc
remove-references-to -t ${super.warp} $out/bin/pandoc
remove-references-to -t ${pandoc_3_5} $out/bin/pandoc
${lib.optionalString (pkgs.stdenv.buildPlatform == pkgs.stdenv.hostPlatform) ''
mkdir -p $out/share/bash-completion/completions
$out/bin/pandoc --bash-completion > $out/share/bash-completion/completions/pandoc''}
installManPage man/*
'';
}))
];

# 2020-12-06: Restrictive upper bounds w.r.t. pandoc-types (https://github.com/owickstrom/pandoc-include-code/issues/27)
pandoc-include-code = doJailbreak super.pandoc-include-code;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ extra-packages:
- tls < 2.1.0 # 2024-07-19: requested by darcs == 2.18.3
- extensions == 0.1.0.2 # 2024-10-20: for GHC 9.10/Cabal 3.12
- network-run == 0.4.0 # 2024-10-20: for GHC 9.10/network == 3.1.*
- typst-symbols >=0.1.6 && <0.1.7 # 2024-11-20: for pandoc 3.5 and quarto

package-maintainers:
abbradar:
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/haskell-modules/hackage-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b85957

Please sign in to comment.