about summary refs log tree commit diff
path: root/default.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-23T22·29+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-01T22·32+0000
commit9e0fdd397382da10a8486d25cfa9d889fdd17f86 (patch)
treec1d097f0ecb1a5366dd22989c2beda9c853dd482 /default.nix
parentfd720fbe4d284d0562ab32e7bb6a3f7171992c21 (diff)
Remove default values for Nix expression parameters
I'm not sure if this commit breaks everything in my monorepo. I think it
will.

Why am I doing this? Perhaps it's a bad idea. I don't fully understand how
readTree works. My ignorance is costing me hours of time spent debugging. In an
effort to better understand readTree, I'm removing the default values for my Nix
expression parameters, which I believe have preventing errors from surfacing.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/default.nix b/default.nix
index cf7e61e4a990..8b973bd2d22d 100644
--- a/default.nix
+++ b/default.nix
@@ -9,11 +9,14 @@ let
   fix = f: let x = f x; in x;
 
   # Global configuration that all packages are called with.
-  config = pkgs: {
-    inherit pkgs;
+  config = self: {
+    inherit self;
+    pkgs = import <nixpkgs> {};
+    depot = import <depot> {};
+    briefcase = import <briefcase> {};
   };
 
-  readTree' = import ~/depot/nix/readTree {};
+  readTree' = import <depot/nix/readTree> {};
 
   # TODO: Find a better way to expose entire monorepo without introducing
   # "infinite recursion".
@@ -27,12 +30,6 @@ let
   };
 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