Use the default emacs attribute over the versioned emacs28 attribute. On current canon, this implies an upgrade to Emacs 29. Emacs < 30 has some CVEs that have never been patched in those release series. The next channel bump will upgrade pkgs.emacs to Emacs 30, so just using the default alias seems to be the easiest solution. See also <https://github.com/NixOS/nixpkgs/pull/386174>. Change-Id: I1580bae138cc0801e0f3431b1a02c8a4585c2996 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13216 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			440 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			440 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ depot, pkgs, ... }:
 | 
						|
 | 
						|
{ name, src, deps ? (_: [ ]), emacs ? pkgs.emacs-nox }:
 | 
						|
 | 
						|
let
 | 
						|
  inherit (pkgs) emacsPackages emacsPackagesFor;
 | 
						|
  inherit (builtins) isString toFile;
 | 
						|
 | 
						|
  finalEmacs = (emacsPackagesFor emacs).emacsWithPackages deps;
 | 
						|
 | 
						|
  srcFile =
 | 
						|
    if isString src
 | 
						|
    then toFile "${name}.el" src
 | 
						|
    else src;
 | 
						|
 | 
						|
in
 | 
						|
depot.nix.writeScriptBin name ''
 | 
						|
  #!/bin/sh
 | 
						|
  ${finalEmacs}/bin/emacs --batch --no-site-file --script ${srcFile} $@
 | 
						|
''
 |