pandoc: Add bash completions

This commit is contained in:
Brian Leung 2022-05-22 13:15:44 -07:00
parent 197e220e46
commit 04dccdf5f5
No known key found for this signature in database
GPG key ID: 3ADC75F013D678F9

View file

@ -1,4 +1,4 @@
{ haskellPackages, fetchpatch, haskell, removeReferencesTo }:
{ stdenv, lib, haskellPackages, fetchpatch, haskell, removeReferencesTo }:
let
static = haskell.lib.compose.justStaticExecutables haskellPackages.pandoc;
@ -13,6 +13,9 @@ in
remove-references-to \
-t ${haskellPackages.pandoc-types} \
$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
'';
}) static).overrideAttrs (drv: {
# These libraries are still referenced, because they generate