87f1e15baa
... some legacy cleanup ... Change-Id: I9e73451256f842e75ddbf1382badaf06c775c755 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2212 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
18 lines
437 B
Nix
18 lines
437 B
Nix
{ depot, pkgs, ... }:
|
|
|
|
{ name, src, deps ? (_: []), emacs ? pkgs.emacs27-nox }:
|
|
|
|
let
|
|
inherit (pkgs) emacsPackages emacsPackagesGen;
|
|
inherit (builtins) isString toFile;
|
|
|
|
finalEmacs = (emacsPackagesGen 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} $@
|
|
''
|