1{ lib, ... }:
2let
3 inherit (lib) types mkOption;
4in
5{
6 options = {
7 meta = lib.mkOption {
8 description = ''
9 The [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes that will be set on the returned derivations.
10
11 Not all [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes are supported, but more can be added as desired.
12 '';
13 apply = lib.filterAttrs (k: v: v != null);
14 type = types.submodule {
15 options = {
16 maintainers = lib.mkOption {
17 type = types.listOf types.raw;
18 default = [];
19 description = ''
20 The [list of maintainers](https://nixos.org/manual/nixpkgs/stable/#var-meta-maintainers) for this test.
21 '';
22 };
23 timeout = lib.mkOption {
24 type = types.nullOr types.int;
25 default = 3600; # 1 hour
26 description = ''
27 The [{option}`test`](#test-opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds.
28 '';
29 };
30 broken = lib.mkOption {
31 type = types.bool;
32 default = false;
33 description = ''
34 Sets the [`meta.broken`](https://nixos.org/manual/nixpkgs/stable/#var-meta-broken) attribute on the [{option}`test`](#test-opt-test) derivation.
35 '';
36 };
37 platforms = lib.mkOption {
38 type = types.listOf types.raw;
39 default = lib.platforms.linux ++ lib.platforms.darwin;
40 description = ''
41 Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
42 '';
43 };
44 };
45 };
46 default = {};
47 };
48 };
49}