diff options
author | Profpatsch <mail@profpatsch.de> | 2020-06-28T03·01+0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2020-06-30T00·19+0000 |
commit | 7f8184c6b77c0912efad2f08beb64fab068f891f (patch) | |
tree | 49e70039ecf58fe56e2164152371b8128734ced8 /overrides/writeElispBin/default.nix | |
parent | 2f21e0c8c0b47dcf1b29c38a32838f48bd873c0b (diff) |
refactor(overrides/writeElispBin): use writeScriptBin r/1134
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
Diffstat (limited to 'overrides/writeElispBin/default.nix')
-rw-r--r-- | overrides/writeElispBin/default.nix | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/overrides/writeElispBin/default.nix b/overrides/writeElispBin/default.nix index f2c81a2c0226..1b3ba054430b 100644 --- a/overrides/writeElispBin/default.nix +++ b/overrides/writeElispBin/default.nix @@ -1,9 +1,9 @@ -{ pkgs, ... }: +{ depot, pkgs, ... }: { name, src, deps ? (_: []), emacs ? pkgs.emacs26-nox }: let - inherit (pkgs) emacsPackages emacsPackagesGen writeTextFile; + inherit (pkgs) emacsPackages emacsPackagesGen; inherit (builtins) isString toFile; finalEmacs = (emacsPackagesGen emacs).emacsWithPackages deps; @@ -11,13 +11,8 @@ let srcFile = if isString src then toFile "${name}.el" src else src; -in writeTextFile { - inherit name; - executable = true; - destination = "/bin/${name}"; - text = '' - #!/bin/sh - ${finalEmacs}/bin/emacs --batch --no-site-file --script ${srcFile} $@ - ''; -} +in depot.nix.writeScriptBin name '' + #!/bin/sh + ${finalEmacs}/bin/emacs --batch --no-site-file --script ${srcFile} $@ +'' |