mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 13:39:15 +03:00
30 lines
497 B
Nix
30 lines
497 B
Nix
![]() |
{ lib, config, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
{
|
||
|
options = {
|
||
|
selector = mkOption {
|
||
|
default = _pkgs : [];
|
||
|
type = with types; functionTo (listOf str);
|
||
|
description = ''
|
||
|
Some descriptive text
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
result = mkOption {
|
||
|
type = types.str;
|
||
|
default = toString (config.selector {
|
||
|
a = "a";
|
||
|
b = "b";
|
||
|
c = "c";
|
||
|
});
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkMerge [
|
||
|
{ selector = pkgs: [ pkgs.a ]; }
|
||
|
{ selector = pkgs: [ pkgs.b ]; }
|
||
|
];
|
||
|
}
|