mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
feat: implement all (?) ci yaml keywords
This commit is contained in:
parent
e752f71dd1
commit
0cca02f442
3 changed files with 649 additions and 21 deletions
|
|
@ -84,7 +84,7 @@ in rec {
|
|||
unsetOr = typ:
|
||||
(types.either unsetType typ)
|
||||
// {
|
||||
inherit (typ) description;
|
||||
inherit (typ) description getSubOptions;
|
||||
};
|
||||
mkUnsetOption = opts:
|
||||
mkOption (opts
|
||||
|
|
@ -93,6 +93,14 @@ in rec {
|
|||
default = opts.default or unset;
|
||||
defaultText = literalExpression "unset";
|
||||
});
|
||||
eitherWithSubOptions = typ_one: typ_two:
|
||||
(types.either typ_one typ_two)
|
||||
// {
|
||||
getSubOptions =
|
||||
if (typ_one.getSubOptions "test" != {})
|
||||
then typ_one.getSubOptions
|
||||
else typ_two.getSubOptions;
|
||||
};
|
||||
|
||||
filterUnset = value:
|
||||
if builtins.isAttrs value && !builtins.hasAttr "_type" value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue