From 0e5da6c34cc83a5f992bc3f3a2611b377ac5add3 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 16 Dec 2019 13:32:10 +0000 Subject: feat: Expose readTree for downstream consumers Exposes readTree from the package set but with a twist: It's exposed as a functor that references the `.config` field from itself to get at the configuration to be passed to packages. This makes it possible for downstream users to make use of `readTree` but with their own configuration. --- default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'default.nix') diff --git a/default.nix b/default.nix index b53aadcaf2..0fd79b93fd 100644 --- a/default.nix +++ b/default.nix @@ -38,6 +38,12 @@ in fix(self: { # Elevate 'lib' from nixpkgs lib = import (self.third_party.nixpkgsSrc + "/lib"); + + # Expose readTree for downstream repo consumers. + readTree = { + __functor = x: (readTree' x.config); + config = self.config; + }; } # Add local packages as structured by readTree -- cgit 1.4.1