about summary refs log tree commit diff
path: root/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-04-10T21·43+0200
committertazjin <mail@tazj.in>2021-04-11T11·08+0000
commit6c4ece917d65174c1c2274cc5ff176c9c0d3fd3a (patch)
tree2e5f6f266bc0ce5a4649bd77f8bd56f281dcd780 /default.nix
parent726eff80f131e81e56faf4b6273ffe74e862e7ab (diff)
feat(3p/nixpkgs): Plumb through externalArgs.nixpkgsBisectPath r/2473
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>
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index ee2207757494..cc2ebcabcfba 100644
--- a/default.nix
+++ b/default.nix
@@ -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 {};