508a62b603
* Remove use of aliases that have been removed in nixpkgs commit a36f455905d55838a0d284656e096fbdb857cf3a: - ncat - x11 - nologin - dbus_libs - emacsPackagesGen - man-pages - pulseaudioLight Change-Id: Ide603bf48bc7f77e10e4aa715ba025aece3644fd Reviewed-on: https://cl.tvl.fyi/c/depot/+/5387 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com>
20 lines
442 B
Nix
20 lines
442 B
Nix
{ depot, pkgs, ... }:
|
|
|
|
{ name, src, deps ? (_: [ ]), emacs ? pkgs.emacs27-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} $@
|
|
''
|