chore(writeElispBin): Move from //overrides to //nix
... some legacy cleanup ... Change-Id: I9e73451256f842e75ddbf1382badaf06c775c755 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2212 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
6c08bcc84d
commit
87f1e15baa
2 changed files with 2 additions and 2 deletions
18
nix/writeElispBin/default.nix
Normal file
18
nix/writeElispBin/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ 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} $@
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue