mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
pkgs/top-level/config.nix: add options.allowNonSource
This commit is contained in:
parent
f24c3a7f8e
commit
1899a02870
2 changed files with 11 additions and 1 deletions
|
@ -55,7 +55,7 @@ let
|
|||
envVar = builtins.getEnv "NIXPKGS_ALLOW_NONSOURCE";
|
||||
in if envVar != ""
|
||||
then envVar != "0"
|
||||
else config.allowNonSource or true;
|
||||
else config.allowNonSource;
|
||||
|
||||
allowlist = config.allowlistedLicenses or config.whitelistedLicenses or [];
|
||||
blocklist = config.blocklistedLicenses or config.blacklistedLicenses or [];
|
||||
|
|
|
@ -12,6 +12,7 @@ let
|
|||
inherit (lib)
|
||||
literalExpression
|
||||
mapAttrsToList
|
||||
mkEnableOption
|
||||
mkOption
|
||||
optionals
|
||||
types
|
||||
|
@ -107,6 +108,15 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
allowNonSource = mkEnableOption "" // {
|
||||
default = true;
|
||||
defaultText = literalExpression ''true && builtins.getEnv "NIXPKGS_ALLOW_NONSOURCE" != "0"'';
|
||||
description = ''
|
||||
Whether to allow non-source packages.
|
||||
Can be combined with `config.allowNonSourcePredicate`.
|
||||
'';
|
||||
};
|
||||
|
||||
allowBroken = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue