From b59f682e860185e0670148d44be290c469bcc300 Mon Sep 17 00:00:00 2001 From: Alexander Ben Nasrallah Date: Sun, 1 May 2022 12:52:16 +0200 Subject: [PATCH] fish: consider man pages from extraOutputsToInstall Some packages provide man pages in extraOutputs, e.g. tmux and tmux.man. --- modules/programs/fish.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 4d7598a4c..179425289 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -322,17 +322,21 @@ in { generateCompletions = package: pkgs.runCommand "${package.name}-fish-completions" { - src = package; + srcs = [ package ] ++ filter (p: p != null) + (builtins.map (outName: package.${outName} or null) + config.home.extraOutputsToInstall); nativeBuildInputs = [ pkgs.python3 ]; buildInputs = [ cfg.package ]; preferLocalBuild = true; } '' mkdir -p $out - if [ -d $src/share/man ]; then - find $src/share/man -type f \ - | xargs python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out \ - > /dev/null - fi + for src in $srcs; do + if [ -d $src/share/man ]; then + find $src/share/man -type f \ + | xargs python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out \ + > /dev/null + fi + done ''; in destructiveSymlinkJoin { name = "${config.home.username}-fish-completions";