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 <zseri.devel@ytrizja.de>
Reviewed-by: tazjin <mail@tazj.in>
Autosubmit: zseri <zseri.devel@ytrizja.de>
This commit is contained in:
zseri 2021-12-27 23:46:27 +01:00 committed by clbot
parent 413c421e8b
commit f791539987
2 changed files with 9 additions and 3 deletions

View file

@ -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)

View file

@ -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