mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-29 01:14:09 +03:00
refactor: remove warnIfIfd
This commit is contained in:
parent
fe424dc2b6
commit
5c6fded684
@ -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 = [];
|
||||
|
@ -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
|
||||
;
|
||||
};
|
||||
|
@ -55,9 +55,6 @@ in {
|
||||
traceJ = mkFunction {
|
||||
type = t.functionTo t.raw;
|
||||
};
|
||||
warnIfIfd = mkFunction {
|
||||
type = t.raw;
|
||||
};
|
||||
isNotDrvAttrs = mkFunction {
|
||||
type = t.bool;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user