config.allowUnsupportedSystem: define as option
commit9f05fc666188c06d5bcc8c1f352d77244ec6f91d
authorArtturin <Artturin@artturin.com>
dateMon 2 May 2022, 20:39 (5 years ago)
parent9f47309
pkgs/stdenv/generic/check-meta.nix+1−1
@@ -37,7 +37,7 @@ let
3737 allowBroken = config.allowBroken
3838 || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
3939
40− allowUnsupportedSystem = config.allowUnsupportedSystem or false
40+ allowUnsupportedSystem = config.allowUnsupportedSystem
4141 || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
4242
4343 isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses;
pkgs/top-level/config.nix+13
@@ -81,6 +81,19 @@ let
8181 See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken">Installing broken packages</link> in the NixOS manual.
8282 '';
8383 };
84+
85+ allowUnsupportedSystem = mkOption {
86+ type = types.bool;
87+ default = false;
88+ # getEnv part is in check-meta.nix
89+ defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"'';
90+ description = ''
91+ Whether to allow unsupported packages.
92+
93+ See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-unsupported-system">Installing packages on unsupported systems</link> in the NixOS manual.
94+ '';
95+ };
96+
8497 };
8598
8699in {