Expose withEmacsPath on emacs attribute
I need this for Nix code that exists outside of this repository.
This commit is contained in:
		
							parent
							
								
									43fc1d93fb
								
							
						
					
					
						commit
						9773bc32ee
					
				
					 1 changed files with 11 additions and 4 deletions
				
			
		|  | @ -4,7 +4,7 @@ let | ||||||
|   inherit (builtins) path; |   inherit (builtins) path; | ||||||
|   inherit (depot.third_party) emacsPackagesGen emacs27; |   inherit (depot.third_party) emacsPackagesGen emacs27; | ||||||
|   inherit (pkgs) writeShellScript writeShellScriptBin; |   inherit (pkgs) writeShellScript writeShellScriptBin; | ||||||
|   inherit (pkgs.lib.strings) makeBinPath; |   inherit (pkgs.lib.strings) concatStringsSep makeBinPath; | ||||||
| 
 | 
 | ||||||
|   emacsBinPath = makeBinPath (with pkgs; [ |   emacsBinPath = makeBinPath (with pkgs; [ | ||||||
|     tdesktop |     tdesktop | ||||||
|  | @ -132,12 +132,19 @@ let | ||||||
|     name = "init.el"; |     name = "init.el"; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   withEmacsPath = { emacsBin, briefcasePath }: |   loadPath = concatStringsSep ":" [ | ||||||
|  |     wpcDir | ||||||
|  |     vendorDir | ||||||
|  |     # TODO: Explain why the trailing ":" is needed. | ||||||
|  |     "${wpcarrosEmacs.deps}/share/emacs/site-lisp:" | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
|  |   withEmacsPath = { emacsBin, briefcasePath ? "$HOME/briefcase" }: | ||||||
|     writeShellScriptBin "wpcarros-emacs" '' |     writeShellScriptBin "wpcarros-emacs" '' | ||||||
|       export XMODIFIERS=emacs |       export XMODIFIERS=emacs | ||||||
|       export BRIEFCASE=${briefcasePath} |       export BRIEFCASE=${briefcasePath} | ||||||
|       export PATH="${emacsBinPath}:$PATH" |       export PATH="${emacsBinPath}:$PATH" | ||||||
|       export EMACSLOADPATH="${wpcDir}:${vendorDir}:${wpcarrosEmacs.deps}/share/emacs/site-lisp:" |       export EMACSLOADPATH="${loadPath}" | ||||||
|       exec ${emacsBin} \ |       exec ${emacsBin} \ | ||||||
|         --debug-init \ |         --debug-init \ | ||||||
|         --no-site-file \ |         --no-site-file \ | ||||||
|  | @ -147,7 +154,7 @@ let | ||||||
|         "$@" |         "$@" | ||||||
|     ''; |     ''; | ||||||
| in { | in { | ||||||
|   inherit initEl; |   inherit initEl withEmacsPath; | ||||||
| 
 | 
 | ||||||
|   # I need to start my Emacs from CI without the call to `--load ${initEl}`. |   # I need to start my Emacs from CI without the call to `--load ${initEl}`. | ||||||
|   runScript = { script, briefcasePath }: |   runScript = { script, briefcasePath }: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue