mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 01:33:11 +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
|
in
|
||||||
if envVar != "" then envVar != "0" else config.allowNonSource or true;
|
if envVar != "" then envVar != "0" else config.allowNonSource or true;
|
||||||
|
|
||||||
allowlist = config.allowlistedLicenses or config.whitelistedLicenses or [ ];
|
allowlist = config.allowlistedLicenses;
|
||||||
blocklist = config.blocklistedLicenses or config.blacklistedLicenses or [ ];
|
blocklist = config.blocklistedLicenses;
|
||||||
|
|
||||||
areLicenseListsValid =
|
areLicenseListsValid =
|
||||||
if mutuallyExclusive allowlist blocklist then
|
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 {
|
cudaSupport = mkMassRebuild {
|
||||||
feature = "build packages with CUDA support by default";
|
feature = "build packages with CUDA support by default";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue