about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--default.nix2
-rw-r--r--third_party/nixpkgs/default.nix10
2 files changed, 9 insertions, 3 deletions
diff --git a/default.nix b/default.nix
index 9a73e99d89..fd02dfbde9 100644
--- a/default.nix
+++ b/default.nix
@@ -2,7 +2,7 @@
 # (see //nix/readTree for details) and constructing a matching attribute set
 # tree.
 
-{ nixpkgsBisectPath ? null, ... }@args:
+{ nixpkgsBisectPath ? null, nixpkgsConfig ? {}, ... }@args:
 
 let
   inherit (builtins)
diff --git a/third_party/nixpkgs/default.nix b/third_party/nixpkgs/default.nix
index 872a7e79e8..f8831f1fd5 100644
--- a/third_party/nixpkgs/default.nix
+++ b/third_party/nixpkgs/default.nix
@@ -57,9 +57,15 @@ let
       stable = stableHashes.commit;
     };
   };
+
 in import nixpkgsSrc {
-  config.allowUnfree = true;
-  config.allowBroken = true;
+  # allow users to inject their config into builds (e.g. to test CA derivations)
+  config =
+    (if externalArgs ? nixpkgsConfig then externalArgs.nixpkgsConfig else { })
+    // {
+      allowUnfree = true;
+      allowBroken = true;
+    };
   overlays = [
     commitsOverlay
     stableOverlay