mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 16:18:34 +01:00
config: add and document {allow,block}listedLicenses
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
This commit is contained in:
parent
494a8d96a8
commit
f5deefd463
|
|
@ -64,8 +64,8 @@ let
|
|||
in
|
||||
if envVar != "" then envVar != "0" else config.allowNonSource or true;
|
||||
|
||||
allowlist = config.allowlistedLicenses or config.whitelistedLicenses or [ ];
|
||||
blocklist = config.blocklistedLicenses or config.blacklistedLicenses or [ ];
|
||||
allowlist = config.allowlistedLicenses;
|
||||
blocklist = config.blocklistedLicenses;
|
||||
|
||||
areLicenseListsValid =
|
||||
if mutuallyExclusive allowlist blocklist then
|
||||
|
|
|
|||
|
|
@ -229,6 +229,36 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
allowlistedLicenses = mkOption {
|
||||
description = ''
|
||||
Allow licenses that are specifically acceptable. `allowlistedLicenses` only applies to unfree licenses unless
|
||||
`allowUnfree` is enabled. It is not a generic allowlist for all types of licenses.
|
||||
'';
|
||||
default = [ ];
|
||||
type = types.listOf (types.attrsOf types.anything);
|
||||
example = literalExpression ''
|
||||
with lib.licenses; [
|
||||
amd
|
||||
wtfpl
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
blocklistedLicenses = mkOption {
|
||||
description = ''
|
||||
Block licenses that are specifically unacceptable. Unlike `allowlistedLicenses`, `blocklistedLicenses`
|
||||
applies to all licenses.
|
||||
'';
|
||||
default = [ ];
|
||||
type = types.listOf (types.attrsOf types.anything);
|
||||
example = literalExpression ''
|
||||
with lib.licenses; [
|
||||
agpl3Only
|
||||
gpl3Only
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
cudaSupport = mkMassRebuild {
|
||||
feature = "build packages with CUDA support by default";
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue