diff options
Diffstat (limited to 'overrides')
-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} $@ +'' |