refactor: Fix a variety of filepaths for repo relayouting
This fixes readTree and the various project builds, as well as (hopefully) most documentation links inside of the projects.
This commit is contained in:
parent
03bfe08e1d
commit
8de5d093d8
12 changed files with 69 additions and 55 deletions
23
overrides/writeElispBin/default.nix
Normal file
23
overrides/writeElispBin/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{ name, src, deps ? (_: []), emacs ? pkgs.third_party.emacs26-nox }:
|
||||
|
||||
let
|
||||
inherit (pkgs.third_party) emacsPackagesNg emacsPackagesNgGen writeTextFile;
|
||||
inherit (builtins) isString toFile;
|
||||
|
||||
finalEmacs = (emacsPackagesNgGen emacs).emacsWithPackages deps;
|
||||
|
||||
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} $@
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue