git.iko.soy/typeable/nixpkgs
on master help sign in
config.allowBroken: define as option
commit9f473092f84f9d704810146fec2a919bf96e5bf0 authorArtturin <Artturin@artturin.com> dateMon 2 May 2022, 17:20 (5 years ago) parent1c49b81
2 files changed+12−1
pkgs/stdenv/generic/check-meta.nix+1−1 pkgs/top-level/config.nix+11
pkgs/stdenv/generic/check-meta.nix+1−1
@@ -34,7 +34,7 @@ let
3434 hasBlocklistedLicense = assert areLicenseListsValid; attrs:
3535 hasLicense attrs && lib.lists.any (l: builtins.elem l blocklist) (lib.lists.toList attrs.meta.license);
3636
37− allowBroken = config.allowBroken or false
37+ allowBroken = config.allowBroken
3838 || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
3939
4040 allowUnsupportedSystem = config.allowUnsupportedSystem or false
pkgs/top-level/config.nix+11
@@ -70,6 +70,17 @@ let
7070 '';
7171 };
7272
73+ allowBroken = mkOption {
74+ type = types.bool;
75+ default = false;
76+ # getEnv part is in check-meta.nix
77+ defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"'';
78+ description = ''
79+ Whether to allow broken packages.
80+
81+ See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken">Installing broken packages</link> in the NixOS manual.
82+ '';
83+ };
7384 };
7485
7586in {