Unverified Commit b1242f43 authored by Connor Baker's avatar Connor Baker Committed by GitHub
Browse files

Revert "config: add and document {allow,block}listedLicenses" (#457338)

parents d0278241 f6a38f9a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -64,8 +64,8 @@ let
    in
    if envVar != "" then envVar != "0" else config.allowNonSource or true;

  allowlist = config.allowlistedLicenses;
  blocklist = config.blocklistedLicenses;
  allowlist = config.allowlistedLicenses or config.whitelistedLicenses or [ ];
  blocklist = config.blocklistedLicenses or config.blacklistedLicenses or [ ];

  areLicenseListsValid =
    if mutuallyExclusive allowlist blocklist then
+0 −30
Original line number Diff line number Diff line
@@ -229,36 +229,6 @@ 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";
    };