refactor: remove warnIfIfd

This commit is contained in:
Yusuf Bera Ertan 2022-11-16 22:57:09 +03:00
parent fe424dc2b6
commit 5c6fded684
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA
3 changed files with 0 additions and 28 deletions

View File

@ -13,13 +13,6 @@
};
in {
options = {
disableIfdWarning = l.mkOption {
type = t.bool;
default = false;
description = ''
Disables IFD warning for translators / builders.
'';
};
overridesDirs = l.mkOption {
type = t.listOf t.path;
default = [];

View File

@ -260,23 +260,6 @@
traceJ = toTrace: eval: l.trace (l.toJSON toTrace) eval;
ifdWarnMsg = module: ''
the builder / translator you are using (`${module.subsystem}.${module.name}`)
uses IFD (https://nixos.wiki/wiki/Glossary) and this *might* cause issues
(for example, `nix flake show` not working). if you are aware of this and
don't wish to see this message, set `config.disableIfdWarning` to `true`
in `dream2nix.lib.init` (or similar functions that take `config`).
'';
warnIfIfd = {
config,
module,
val,
}:
l.warnIf
((! (config.disableIfdWarning or false)) && module.type == "ifd")
(ifdWarnMsg module)
val;
mkFunction = {type, ...} @ attrs:
l.mkOption (
attrs
@ -305,7 +288,6 @@ in {
sanitizeRelativePath
systemsFromFile
traceJ
warnIfIfd
isNotDrvAttrs
;
};

View File

@ -55,9 +55,6 @@ in {
traceJ = mkFunction {
type = t.functionTo t.raw;
};
warnIfIfd = mkFunction {
type = t.raw;
};
isNotDrvAttrs = mkFunction {
type = t.bool;
};