Use runCommandLocal
This commit is contained in:
parent
78eb3559a9
commit
8b4fc00d8e
1 changed files with 9 additions and 6 deletions
15
default.nix
15
default.nix
|
|
@ -45,6 +45,7 @@
|
||||||
emacsPackagesFor,
|
emacsPackagesFor,
|
||||||
lib,
|
lib,
|
||||||
runCommand,
|
runCommand,
|
||||||
|
runCommandLocal,
|
||||||
runtimeShell,
|
runtimeShell,
|
||||||
writeText,
|
writeText,
|
||||||
makeBinaryWrapper,
|
makeBinaryWrapper,
|
||||||
|
|
@ -63,9 +64,8 @@ let
|
||||||
# Uses Doom's CLI framework, which does not require anything else is installed
|
# Uses Doom's CLI framework, which does not require anything else is installed
|
||||||
# (not even straight).
|
# (not even straight).
|
||||||
|
|
||||||
# XXX this may need to be runCommandLocal just in case conditionals an init.el
|
# Force local build in case the user init.el does something weird and to avoid a roundtrip.
|
||||||
# / packages.el evaluate differently on build systems.
|
doomIntermediates = runCommandLocal "doom-intermediates"
|
||||||
doomIntermediates = runCommand "doom-intermediates"
|
|
||||||
{
|
{
|
||||||
env = {
|
env = {
|
||||||
EMACS = lib.getExe emacs;
|
EMACS = lib.getExe emacs;
|
||||||
|
|
@ -195,7 +195,8 @@ let
|
||||||
} // optionalAttrs (p ? recipe.branch) { ref = p.recipe.branch; }
|
} // optionalAttrs (p ? recipe.branch) { ref = p.recipe.branch; }
|
||||||
// optionalAttrs (p ? recipe.depth) { shallow = p.recipe.depth == 1; }
|
// optionalAttrs (p ? recipe.depth) { shallow = p.recipe.depth == 1; }
|
||||||
);
|
);
|
||||||
reqfile = runCommand "${name}-deps" { } ''
|
# Run locally to avoid a network roundtrip.
|
||||||
|
reqfile = runCommandLocal "${name}-deps" { } ''
|
||||||
${lib.getExe emacs} -Q --batch --script \
|
${lib.getExe emacs} -Q --batch --script \
|
||||||
${./build-helpers/print-deps.el} ${src} > $out
|
${./build-helpers/print-deps.el} ${src} > $out
|
||||||
'';
|
'';
|
||||||
|
|
@ -227,8 +228,8 @@ let
|
||||||
# - The path to the generated profile is included in the loader
|
# - The path to the generated profile is included in the loader
|
||||||
# - Generating the profile depends on the loader
|
# - Generating the profile depends on the loader
|
||||||
|
|
||||||
# XXX runCommandLocal? (See doomIntermediates.)
|
# Force local build in case the user init.el does something weird.
|
||||||
doomProfile = runCommand "doom-profile"
|
doomProfile = runCommandLocal "doom-profile"
|
||||||
{
|
{
|
||||||
env = {
|
env = {
|
||||||
EMACS = lib.getExe emacsWithPackages;
|
EMACS = lib.getExe emacsWithPackages;
|
||||||
|
|
@ -279,6 +280,8 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Step 6: write wrappers to start the whole thing.
|
# Step 6: write wrappers to start the whole thing.
|
||||||
|
|
||||||
|
# Use runCommand, not runCommandLocal, because makeBinaryWrapper pulls in a compiler.
|
||||||
doomEmacs = runCommand "doom-emacs" {
|
doomEmacs = runCommand "doom-emacs" {
|
||||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||||
} ''
|
} ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue