diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index ba9eae53d35f..e0ead55d1a78 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -37,7 +37,7 @@ let allowBroken = config.allowBroken || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; - allowUnsupportedSystem = config.allowUnsupportedSystem or false + allowUnsupportedSystem = config.allowUnsupportedSystem || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"; isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses; diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index 6bff00f982d6..7665815d4125 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -81,6 +81,19 @@ let See Installing broken packages in the NixOS manual. ''; }; + + allowUnsupportedSystem = mkOption { + type = types.bool; + default = false; + # getEnv part is in check-meta.nix + defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"''; + description = '' + Whether to allow unsupported packages. + + See Installing packages on unsupported systems in the NixOS manual. + ''; + }; + }; in {