summary refs log tree commit diff
path: root/pkgs/top-level/config.nix
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2022-05-02 17:20:44 +0300
committerArtturin <Artturin@artturin.com>2022-05-02 17:20:44 +0300
commit9f473092f84f9d704810146fec2a919bf96e5bf0 (patch)
tree740279b0777a1acf996fd736d21f522110f61f8b /pkgs/top-level/config.nix
parent1c49b81263858c69b932da05ae63a7767b308e74 (diff)
config.allowBroken: define as option
Diffstat (limited to 'pkgs/top-level/config.nix')
-rw-r--r--pkgs/top-level/config.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix
index cb713ec277307..6bff00f982d64 100644
--- a/pkgs/top-level/config.nix
+++ b/pkgs/top-level/config.nix
@@ -70,6 +70,17 @@ let
       '';
     };
 
+    allowBroken = mkOption {
+      type = types.bool;
+      default = false;
+      # getEnv part is in check-meta.nix
+      defaultText = literalExpression ''false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"'';
+      description = ''
+        Whether to allow broken packages.
+
+        See <link xlink:href="https://nixos.org/manual/nixpkgs/stable/#sec-allow-broken">Installing broken packages</link> in the NixOS manual.
+      '';
+    };
   };
 
 in {