diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 1a3e65ea650d..c59e92e114ea 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -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 diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index 09d31a2d117c..bf9419571158 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -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"; };