nix-module-wrapper-manager-fds/modules/wrapper-manager/base.nix
Gabriel Arazas 28dfaefc20 wrapper-manager-fds/modules: overhaul wrapper config
Now, there could be multiple wrappers within the configuration but it
should still result with one derivation unlike the original version.
This could be handy for making package overrides with multiple binaries
(for example, 7Z) while making the interface consistent. This turns out
to be way nicer than I thought which is a good thing.
2024-07-08 21:12:31 +08:00

47 lines
1.1 KiB
Nix

{ config, lib, ... }:
{
options = {
wrappers = lib.mkOption {
type = with lib.types; attrsOf (submoduleWith {
modules = [ ./shared/wrappers.nix ];
specialArgs.envConfig = config;
});
description = ''
A set of wrappers to be included in the resulting derivation from
wrapper-manager evaluation.
'';
default = { };
example = lib.literalExpression ''
{
yt-dlp-audio = {
arg0 = lib.getExe' pkgs.yt-dlp "yt-dlp";
prependArgs = [
"--config-location" ./config/yt-dlp/audio.conf
];
};
}
'';
};
basePackages = lib.mkOption {
type = with lib.types; listOf package;
description = ''
A list of packages to be included in the wrapper package.
::: {note}
If the list is not empty, this can override some of the binaries
included in this list which is typically intended to be used as a
wrapped package.
:::
'';
default = [ ];
example = lib.literalExpression ''
with pkgs; [
yt-dlp
]
'';
};
};
}