emacs: use runCommand to generate wrapper
This removes the unnecessary compiler build dependency. We also set preferLocalBuild = true; allowSubstitutes = false; to not farm out the build on a remote builder or bother with trying to find a binary substitution.
This commit is contained in:
parent
cde50a4fab
commit
241e28e3d1
@ -32,7 +32,7 @@ in customEmacsPackages.emacsWithPackages (epkgs: [ epkgs.evil epkgs.magit ])
|
||||
|
||||
*/
|
||||
|
||||
{ lib, lndir, makeWrapper, runCommand, stdenv }: self:
|
||||
{ lib, lndir, makeWrapper, runCommand }: self:
|
||||
|
||||
with lib; let inherit (self) emacs; in
|
||||
|
||||
@ -45,11 +45,15 @@ let
|
||||
else packagesFun;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = (appendToName "with-packages" emacs).name;
|
||||
runCommand
|
||||
(appendToName "with-packages" emacs).name
|
||||
{
|
||||
nativeBuildInputs = [ emacs lndir makeWrapper ];
|
||||
inherit emacs explicitRequires;
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
||||
# Store all paths we want to add to emacs here, so that we only need to add
|
||||
# one path to the load lists
|
||||
deps = runCommand "emacs-packages-deps"
|
||||
@ -142,8 +146,9 @@ EOF
|
||||
$emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" "$subdirs"
|
||||
'';
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
inherit (emacs) meta;
|
||||
}
|
||||
''
|
||||
mkdir -p "$out/bin"
|
||||
|
||||
# Wrap emacs and friends so they find our site-start.el before the original.
|
||||
@ -172,6 +177,4 @@ EOF
|
||||
for dir in applications icons info man; do
|
||||
ln -s $emacs/share/$dir $out/share/$dir
|
||||
done
|
||||
'';
|
||||
inherit (emacs) meta;
|
||||
}
|
||||
''
|
||||
|
@ -60,7 +60,7 @@ let
|
||||
};
|
||||
|
||||
emacsWithPackages = import ../build-support/emacs/wrapper.nix {
|
||||
inherit lib lndir makeWrapper stdenv runCommand;
|
||||
inherit lib lndir makeWrapper runCommand;
|
||||
};
|
||||
|
||||
mkManualPackages = import ../applications/editors/emacs-modes/manual-packages.nix {
|
||||
|
Loading…
x
Reference in New Issue
Block a user