From 04dccdf5f5af38db0af8f720416a01157cc77f9a Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sun, 22 May 2022 13:15:44 -0700 Subject: [PATCH] pandoc: Add bash completions --- pkgs/development/tools/pandoc/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/pandoc/default.nix b/pkgs/development/tools/pandoc/default.nix index 515c7dc4c37..c64e47686cf 100644 --- a/pkgs/development/tools/pandoc/default.nix +++ b/pkgs/development/tools/pandoc/default.nix @@ -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