feat(3p/nixpkgs): Plumb through externalArgs.nixpkgsBisectPath

This lets the import of the depot root accept an additional argument
called `externalArgs`, which can be used to pass additional arguments
into a depot package set.

This is used in //third_party/nixpkgs for replacing the source of the
nixos-unstable channel with a path. With this we can bisect the
nixpkgs used in third_party easily.

Change-Id: I4f65eb3d6b521ed9f437649b7b068f1e6ab8210f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2925
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2021-04-10 23:43:41 +02:00 committed by tazjin
parent 726eff80f1
commit 6c4ece917d
2 changed files with 17 additions and 4 deletions

View file

@ -5,7 +5,7 @@
# This makes packages accessible via the Nixery instance that is configured to
# use this repository as its nixpkgs source.
{ ... }@args:
{ nixpkgsBisectPath ? null, ... }@args:
with builtins;
@ -24,6 +24,13 @@ let
# Pass third_party as 'pkgs' (for compatibility with external
# imports for certain subdirectories)
pkgs = depot.third_party.nixpkgs;
# Pass arguments passed to the entire depot through, for packages
# that would like to add functionality based on this.
#
# Note that it is intended for exceptional circumstance, such as
# debugging by bisecting nixpkgs.
externalArgs = args;
};
readTree' = import ./nix/readTree {};