2020-01-23 17:30:39 +01:00
|
|
|
# At the time of this writing, this configuration was taken from @tazjin's
|
|
|
|
# default.nix from his depot. I've added, changed, and removed that parts that I
|
|
|
|
# don't need, and this is what remains.
|
|
|
|
{ ... }@args:
|
|
|
|
|
|
|
|
with builtins;
|
|
|
|
|
|
|
|
let
|
|
|
|
fix = f: let x = f x; in x;
|
|
|
|
|
|
|
|
# Global configuration that all packages are called with.
|
|
|
|
config = pkgs: {
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
|
|
|
|
2020-01-27 15:57:47 +01:00
|
|
|
readTree' = import ~/depot/nix/readTree {};
|
2020-01-23 17:30:39 +01:00
|
|
|
|
2020-01-23 22:58:31 +01:00
|
|
|
# TODO: Find a better way to expose entire monorepo without introducing
|
|
|
|
# "infinite recursion".
|
2020-01-23 17:30:39 +01:00
|
|
|
localPkgs = readTree: {
|
2020-01-23 22:58:31 +01:00
|
|
|
blog = readTree ./blog;
|
2020-01-24 11:50:05 +01:00
|
|
|
lisp = readTree ./lisp;
|
2020-02-09 14:47:48 +01:00
|
|
|
gopkgs = readTree ./gopkgs;
|
|
|
|
monzo_ynab = readTree ./monzo_ynab;
|
2020-01-23 22:58:31 +01:00
|
|
|
third_party = readTree ./third_party;
|
2020-02-12 17:58:29 +01:00
|
|
|
tools = readTree ./tools;
|
2020-01-23 17:30:39 +01:00
|
|
|
};
|
|
|
|
in fix(self: {
|
|
|
|
config = config self;
|
|
|
|
|
|
|
|
# Expose readTree for downstream repo consumers.
|
|
|
|
readTree = {
|
|
|
|
__functor = x: (readTree' x.config);
|
|
|
|
config = self.config;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
# Add local packages as structured by readTree
|
|
|
|
// (localPkgs (readTree' (self.config // { inherit (self) lib; })))
|
|
|
|
)
|