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.
This commit is contained in:
		
							parent
							
								
									fd720fbe4d
								
							
						
					
					
						commit
						9e0fdd3973
					
				
					 28 changed files with 36 additions and 97 deletions
				
			
		|  | @ -1,15 +1,10 @@ | |||
| { | ||||
|   nixpkgs ? import <nixpkgs> {}, | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { pkgs, depot, briefcase, ... }: | ||||
| 
 | ||||
| let | ||||
|   injections = nixpkgs.writeText "injections.lisp" '' | ||||
|   injections = pkgs.writeText "injections.lisp" '' | ||||
|     (in-package #:server) | ||||
|     (setq *path-to-posts* "${./posts}") | ||||
|     (setq *pandoc-bin* "${nixpkgs.pandoc}/bin/pandoc") | ||||
|     (setq *pandoc-bin* "${pkgs.pandoc}/bin/pandoc") | ||||
|     (setq *html-template* "${./src/index.html}") | ||||
|   ''; | ||||
| in depot.nix.buildLisp.program { | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   pkgs ? import <nixpkgs> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { pkgs, briefcase, ... }: | ||||
| 
 | ||||
| pkgs.dockerTools.buildLayeredImage { | ||||
|   name = "blog"; | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { briefcase ? import <briefcase> {}, ... }: | ||||
| { briefcase, ... }: | ||||
| 
 | ||||
| briefcase.nix.buildClojure.program { | ||||
|   name = "test"; | ||||
|  |  | |||
							
								
								
									
										15
									
								
								default.nix
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								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 | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| { | ||||
|   pkgs ? import <nixpkgs> {}, | ||||
|   depot ? import <depot> {}, | ||||
|   ... | ||||
| }: | ||||
| { pkgs, depot, ... }: | ||||
| 
 | ||||
| let | ||||
|   utils = import ~/briefcase/utils; | ||||
|   utils = import <briefcase/utils>; | ||||
|   # NOTE: I'm trying to keep the list of dependencies herein constrained to a | ||||
|   # list of generic dependencies (i.e. not project or language specific). For | ||||
|   # language-specific tooling, I'm intending to use shell.nix alongside lorri | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { pkgs ? import <nixpkgs> {} , ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| # TODO: Is it appropriate to put programming language dependencies here? Should | ||||
| # I have a bin dependency for every fish `abbr` and `alias` that I use? What | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { pkgs ? import <nixpkgs> {}, ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.mkShell { | ||||
|   buildInputs = [ | ||||
|  |  | |||
|  | @ -1,7 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| depot.buildGo.package { | ||||
|   name = "kv"; | ||||
|  |  | |||
|  | @ -1,7 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| depot.buildGo.package { | ||||
|   name = "utils"; | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, briefcase, ... }: | ||||
| 
 | ||||
| depot.nix.buildLisp.library { | ||||
|   name = "f"; | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { depot ? import <depot> {}, ... }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| depot.nix.buildLisp.library { | ||||
|   name = "prelude"; | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { depot ? import <depot> {}, ... }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (builtins) fetchGit; | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, briefcase, ... }: | ||||
| 
 | ||||
| depot.buildGo.program { | ||||
|   name = "job"; | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   pkgs ? import <nixpkgs> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { pkgs, briefcase, ... }: | ||||
| 
 | ||||
| pkgs.mkShell { | ||||
|   buildInputs = [ | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, briefcase, ... }: | ||||
| 
 | ||||
| let | ||||
|   auth = depot.buildGo.package { | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { pkgs ? import <nixpkgs> {}, ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.mkShell { | ||||
|   buildInputs = with pkgs; [ | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { pkgs ? import <nixpkgs> {}, ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.mkShell rec { | ||||
|   buildInputs = []; | ||||
|  |  | |||
							
								
								
									
										2
									
								
								third_party/lisp/anaphora.nix
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								third_party/lisp/anaphora.nix
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,4 @@ | |||
| { depot ? import <depot> {}, ... }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| let | ||||
|   src = builtins.fetchGit { | ||||
|  |  | |||
							
								
								
									
										2
									
								
								third_party/lisp/cl-arrows.nix
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								third_party/lisp/cl-arrows.nix
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,4 @@ | |||
| { depot ? import <depot> {}, ... }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| let | ||||
|   src = builtins.fetchGit { | ||||
|  |  | |||
							
								
								
									
										6
									
								
								third_party/lisp/cl-colors.nix
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								third_party/lisp/cl-colors.nix
									
										
									
									
										vendored
									
									
								
							|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, briefcase, ... }: | ||||
| 
 | ||||
| let | ||||
|   src = builtins.fetchGit { | ||||
|  |  | |||
							
								
								
									
										6
									
								
								third_party/lisp/let-plus.nix
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								third_party/lisp/let-plus.nix
									
										
									
									
										vendored
									
									
								
							|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, briefcase, ... }: | ||||
| 
 | ||||
| let | ||||
|   src = builtins.fetchGit { | ||||
|  |  | |||
							
								
								
									
										2
									
								
								third_party/lisp/linear-programming.nix
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								third_party/lisp/linear-programming.nix
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,4 @@ | |||
| { depot ? import <depot> {}, ... }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| let | ||||
|   src = builtins.fetchGit { | ||||
|  |  | |||
							
								
								
									
										6
									
								
								third_party/lisp/prove.nix
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								third_party/lisp/prove.nix
									
										
									
									
										vendored
									
									
								
							|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, briefcase, ... }: | ||||
| 
 | ||||
| let | ||||
|   src = builtins.fetchGit { | ||||
|  |  | |||
|  | @ -1,6 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, ... | ||||
| }: | ||||
| { depot, ... }: | ||||
| 
 | ||||
| # TODO: This doesn't depend on `sendgmr` at the moment, but it should. As such, | ||||
| # it's an imcomplete packaging. | ||||
|  |  | |||
|  | @ -1,9 +1,4 @@ | |||
| { | ||||
|   pkgs ? import <nixpkgs> {}, | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { pkgs, depot, briefcase, ... }: | ||||
| 
 | ||||
| depot.buildGo.program { | ||||
|   name = "run"; | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { pkgs ? import <nixpkgs> {}, ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.mkShell { | ||||
|   buildInputs = with pkgs; [ | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| { pkgs ? import <nixpkgs> {}, ... }: | ||||
| { pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   script = pkgs.writeShellScriptBin "simple_vim" '' | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   depot ? import <depot> {}, | ||||
|   briefcase ? import <briefcase> {}, | ||||
|   ... | ||||
| }: | ||||
| { depot, briefcase, ... }: | ||||
| 
 | ||||
| depot.buildGo.program { | ||||
|   name = "symlink-mgr"; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue