mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-31 10:58:24 +00:00
Gabriel Arazas
28dfaefc20
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.
47 lines
1.1 KiB
Nix
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
|
|
]
|
|
'';
|
|
};
|
|
};
|
|
}
|