From 5d9d84f4cfdbed049e71ce6f15bb1ad8650f7acf Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 21 Feb 2020 12:45:43 +0000 Subject: [PATCH] refactor: Pass the depot as an argument named 'depot' This change, which I've been meaning to do for a while, renames the attributes passed by readTree to things in the tree so that: * the depot root is now 'depot' * depot.third_party is additionally passed as 'pkgs' (for compatibility with exported subtrees) --- default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index cda18ee7f..cf70c704a 100644 --- a/default.nix +++ b/default.nix @@ -15,8 +15,12 @@ let fix = f: let x = f x; in x; # Global configuration that all packages are called with. - config = pkgs: { - inherit pkgs; + config = depot: { + inherit depot; + + # Pass third_party as 'pkgs' (for compatibility with external + # imports for certain subdirectories) + pkgs = depot.third_party; kms = { project = "tazjins-infrastructure"; @@ -58,5 +62,5 @@ in fix(self: { # # This can be used to move things from third_party into the top-level, too (such # as `lib`). -// (readTree' { pkgs = self; }) ./overrides +// (readTree' { depot = self; pkgs = self.third_party; }) ./overrides )