mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
config.allowUnsupportedSystem: define as option
This commit is contained in:
parent
9f473092f8
commit
9f05fc6661
2 changed files with 14 additions and 1 deletions
|
@ -37,7 +37,7 @@ let
|
||||||
allowBroken = config.allowBroken
|
allowBroken = config.allowBroken
|
||||||
|| builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
|
|| builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
|
||||||
|
|
||||||
allowUnsupportedSystem = config.allowUnsupportedSystem or false
|
allowUnsupportedSystem = config.allowUnsupportedSystem
|
||||||
|| builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
|
|| builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
|
||||||
|
|
||||||
isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses;
|
isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses;
|
||||||
|
|
|
@ -81,6 +81,19 @@ let
|
||||||
See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken">Installing broken packages</link> in the NixOS manual.
|
See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken">Installing broken packages</link> 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 <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-unsupported-system">Installing packages on unsupported systems</link> in the NixOS manual.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue