mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Merge pull request #171248 from Artturin/addtoconfig1
This commit is contained in:
commit
e982910064
@ -72,7 +72,7 @@ in {
|
||||
})
|
||||
(mkIf cfg.enableAllFirmware {
|
||||
assertions = [{
|
||||
assertion = !cfg.enableAllFirmware || (config.nixpkgs.config.allowUnfree or false);
|
||||
assertion = !cfg.enableAllFirmware || config.nixpkgs.config.allowUnfree;
|
||||
message = ''
|
||||
the list of hardware.enableAllFirmware contains non-redistributable licensed firmware files.
|
||||
This requires nixpkgs.config.allowUnfree to be true.
|
||||
|
@ -13,7 +13,7 @@ let
|
||||
# for why this defaults to false, but I (@copumpkin) want to default it to true soon.
|
||||
shouldCheckMeta = config.checkMeta or false;
|
||||
|
||||
allowUnfree = config.allowUnfree or false
|
||||
allowUnfree = config.allowUnfree
|
||||
|| builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1";
|
||||
|
||||
allowlist = config.allowlistedLicenses or config.whitelistedLicenses or [];
|
||||
@ -34,10 +34,10 @@ let
|
||||
hasBlocklistedLicense = assert areLicenseListsValid; attrs:
|
||||
hasLicense attrs && lib.lists.any (l: builtins.elem l blocklist) (lib.lists.toList attrs.meta.license);
|
||||
|
||||
allowBroken = config.allowBroken or false
|
||||
allowBroken = config.allowBroken
|
||||
|| builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
|
||||
|
||||
allowUnsupportedSystem = config.allowUnsupportedSystem or false
|
||||
allowUnsupportedSystem = config.allowUnsupportedSystem
|
||||
|| builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
|
||||
|
||||
isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses;
|
||||
|
@ -58,6 +58,42 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
allowUnfree = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
# getEnv part is in check-meta.nix
|
||||
defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1"'';
|
||||
description = ''
|
||||
Whether to allow unfree packages.
|
||||
|
||||
See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree">Installing unfree packages</link> in the NixOS manual.
|
||||
'';
|
||||
};
|
||||
|
||||
allowBroken = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
# getEnv part is in check-meta.nix
|
||||
defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"'';
|
||||
description = ''
|
||||
Whether to allow broken packages.
|
||||
|
||||
See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken">Installing broken packages</link> in the NixOS manual.
|
||||
'';
|
||||
};
|
||||
|
||||
allowUnsupportedSystem = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
# getEnv part is in check-meta.nix
|
||||
defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"'';
|
||||
description = ''
|
||||
Whether to allow unsupported packages.
|
||||
|
||||
See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-unsupported-system">Installing packages on unsupported systems</link> in the NixOS manual.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
in {
|
||||
|
Loading…
Reference in New Issue
Block a user