diff --git a/pkgs/applications/networking/irc/weechat/wrapper.nix b/pkgs/applications/networking/irc/weechat/wrapper.nix index 81073222c2b4..bd05b63c68bb 100644 --- a/pkgs/applications/networking/irc/weechat/wrapper.nix +++ b/pkgs/applications/networking/irc/weechat/wrapper.nix @@ -6,7 +6,8 @@ weechat: let wrapper = { - configure ? { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; } + installManPages ? true + , configure ? { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; } }: let @@ -65,14 +66,22 @@ let ${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins} exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init} '') // { - inherit (weechat) name; + inherit (weechat) name man; unwrapped = weechat; + outputs = [ "out" "man" ]; }; in buildEnv { name = "weechat-bin-env-${weechat.version}"; + extraOutputsToInstall = lib.optionals installManPages [ "man" ]; paths = [ (mkWeechat "weechat") (mkWeechat "weechat-headless") + (runCommand "weechat-out-except-bin" { } '' + mkdir $out + ln -sf ${weechat}/include $out/include + ln -sf ${weechat}/lib $out/lib + ln -sf ${weechat}/share $out/share + '') ]; meta = builtins.removeAttrs weechat.meta [ "outputsToInstall" ]; };