weechat: install all outputs into the final store path
Resolves #59300 Until now only `$out/bin/weechat` and `$out/bin/weechat-headless` were installed into the store path that will be used when running i.e. `nix-env -iA weechat`. Further outputs like icons (`$out/share/icons`), man pages (`$man`) or the HTML documentation (`$out/share/doc/weechat`) are omitted at the moment. As this can be fairly confusing I figured that it's better to copy those files into the environment as well. As `buildEnv` doesn't appear to support output splitting (you can only install additional outputs of `paths` using `extraOutputsToInstall`), it's easier for now to always install the `man` output by default. Man page installation can be turned off like this now: ``` weechat.override { installManPages = false; } ```
This commit is contained in:
parent
cd80cab3b0
commit
681b1d8061
@ -6,7 +6,8 @@ weechat:
|
|||||||
|
|
||||||
let
|
let
|
||||||
wrapper = {
|
wrapper = {
|
||||||
configure ? { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; }
|
installManPages ? true
|
||||||
|
, configure ? { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; }
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -65,14 +66,22 @@ let
|
|||||||
${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
|
${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
|
||||||
exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init}
|
exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init}
|
||||||
'') // {
|
'') // {
|
||||||
inherit (weechat) name;
|
inherit (weechat) name man;
|
||||||
unwrapped = weechat;
|
unwrapped = weechat;
|
||||||
|
outputs = [ "out" "man" ];
|
||||||
};
|
};
|
||||||
in buildEnv {
|
in buildEnv {
|
||||||
name = "weechat-bin-env-${weechat.version}";
|
name = "weechat-bin-env-${weechat.version}";
|
||||||
|
extraOutputsToInstall = lib.optionals installManPages [ "man" ];
|
||||||
paths = [
|
paths = [
|
||||||
(mkWeechat "weechat")
|
(mkWeechat "weechat")
|
||||||
(mkWeechat "weechat-headless")
|
(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" ];
|
meta = builtins.removeAttrs weechat.meta [ "outputsToInstall" ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user