refactor: Replace 'depotPath' with 'depot.path'

Instead of having two ways of accessing the path to the depot (one of
which was stuttering, depot.depotPath) we settle on only one:
depot.path.

This was mostly used for NixOS module imports.

Co-Authored-By: Florian Klink <flokli@flokli.de>
Change-Id: I2c0db23383fc34f6ca76baaad4cc4af2d9dfae15
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2962
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2021-04-12 22:26:55 +02:00 committed by tazjin
parent a559135970
commit f520bd40ca
12 changed files with 35 additions and 39 deletions

View file

@ -47,12 +47,7 @@ let
(node.meta.targets or []))
else [];
# Make the path to the depot available for things that might need it
# (e.g. NixOS module inclusions)
depotPath = ./.;
in fix(self: (readTree' {
# TODO(tazjin): Settle on one way of using depotPath
inherit depotPath;
depot = self;
# Pass third_party as 'pkgs' (for compatibility with external
@ -69,7 +64,9 @@ in fix(self: (readTree' {
# debugging by bisecting nixpkgs.
externalArgs = args;
} ./.) // {
inherit depotPath;
# Make the path to the depot available for things that might need it
# (e.g. NixOS module inclusions)
path = ./.;
# List of all buildable targets, for CI purposes.
#