fix: make parseParams optional

This commit is contained in:
Yusuf Bera Ertan 2022-10-07 17:40:42 +03:00
parent 10b6663f7b
commit 109e32da9c
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA
5 changed files with 10 additions and 9 deletions

View File

@ -186,7 +186,7 @@ in {
fetcher = fetchers."${fetcherName}";
args =
if fetcher ? parseParams
if fetcher.parseParams != null
then fetcher.parseParams params
else if b.length params != b.length fetcher.inputs
then

View File

@ -17,7 +17,7 @@ in {
description = "Subsystem of the builder.";
};
build = lib.mkOption {
type = t.functionTo t.attrs;
type = t.uniq (t.functionTo t.attrs);
default = _: {};
};
type = lib.mkOption {

View File

@ -17,7 +17,7 @@ in {
description = "Subsystem of the discoverer.";
};
discover = lib.mkOption {
type = t.functionTo (t.listOf t.attrs);
type = t.uniq (t.functionTo (t.listOf t.attrs));
default = _: {};
};
};

View File

@ -41,14 +41,15 @@ in {
'';
};
parseParams = l.mkOption {
type = t.functionTo t.attrs;
type = t.nullOr (t.uniq (t.functionTo t.attrs));
default = null;
};
outputs = l.mkOption {
type = t.functionTo (
type = t.uniq (t.functionTo (
t.submoduleWith {
modules = [outputsOptions];
}
);
));
};
};
}

View File

@ -8,7 +8,7 @@ in {
default = false;
};
discoverProject = lib.mkOption {
type = t.nullOr (t.functionTo (t.anything));
type = t.nullOr (t.uniq (t.functionTo (t.anything)));
default = null;
};
extraArgs = lib.mkOption {
@ -43,11 +43,11 @@ in {
type = t.str;
};
translate = lib.mkOption {
type = t.nullOr (t.functionTo t.attrs);
type = t.nullOr (t.uniq (t.functionTo t.attrs));
default = null;
};
finalTranslate = lib.mkOption {
type = t.nullOr (t.functionTo t.attrs);
type = t.nullOr (t.uniq (t.functionTo t.attrs));
readOnly = true;
description = ''
the final translate that you should use.