refactor(overrides/writeElispBin): use writeScriptBin
Change-Id: Ib9793da985128b4a8f64b04086ea89ce81118188 Reviewed-on: https://cl.tvl.fyi/c/depot/+/705 Tested-by: BuildkiteCI Reviewed-by: Kane York <rikingcoding@gmail.com> Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: BuildkiteCI
This commit is contained in:
parent
2f21e0c8c0
commit
7f8184c6b7
2 changed files with 6 additions and 12 deletions
|
@ -1,9 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{ depot, pkgs, ... }:
|
||||||
|
|
||||||
{ name, src, deps ? (_: []), emacs ? pkgs.emacs26-nox }:
|
{ name, src, deps ? (_: []), emacs ? pkgs.emacs26-nox }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs) emacsPackages emacsPackagesGen writeTextFile;
|
inherit (pkgs) emacsPackages emacsPackagesGen;
|
||||||
inherit (builtins) isString toFile;
|
inherit (builtins) isString toFile;
|
||||||
|
|
||||||
finalEmacs = (emacsPackagesGen emacs).emacsWithPackages deps;
|
finalEmacs = (emacsPackagesGen emacs).emacsWithPackages deps;
|
||||||
|
@ -11,13 +11,8 @@ let
|
||||||
srcFile = if isString src
|
srcFile = if isString src
|
||||||
then toFile "${name}.el" src
|
then toFile "${name}.el" src
|
||||||
else src;
|
else src;
|
||||||
in writeTextFile {
|
|
||||||
inherit name;
|
|
||||||
executable = true;
|
|
||||||
destination = "/bin/${name}";
|
|
||||||
|
|
||||||
text = ''
|
in depot.nix.writeScriptBin name ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
${finalEmacs}/bin/emacs --batch --no-site-file --script ${srcFile} $@
|
${finalEmacs}/bin/emacs --batch --no-site-file --script ${srcFile} $@
|
||||||
'';
|
''
|
||||||
}
|
|
||||||
|
|
1
third_party/default.nix
vendored
1
third_party/default.nix
vendored
|
@ -135,7 +135,6 @@ let
|
||||||
writeShellScript
|
writeShellScript
|
||||||
writeShellScriptBin
|
writeShellScriptBin
|
||||||
writeText
|
writeText
|
||||||
writeTextFile
|
|
||||||
xorg
|
xorg
|
||||||
xz
|
xz
|
||||||
zlib
|
zlib
|
||||||
|
|
Loading…
Reference in a new issue