From f79153998783532c9bbce9347ae7d2ac0de31d9e Mon Sep 17 00:00:00 2001 From: zseri Date: Mon, 27 Dec 2021 23:46:27 +0100 Subject: feat(3p/nixpkgs): allow injecting user nixpkgs config use case: system-wide 'testing' usage of content-addressed derivations Change-Id: I1f63ddf679da7d53ff0d8a851642dd081a70fe55 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4551 Tested-by: BuildkiteCI Reviewed-by: zseri Reviewed-by: tazjin Autosubmit: zseri --- third_party/nixpkgs/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'third_party/nixpkgs') 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 -- cgit 1.4.1