emacsPackagesNg.trivialBuild: cleanup and standardize function
No real function change here, but this updates the trivial and melpa builders to be formatted more consistently with the rest of the builders, and swaps `eval "$preBuild"` for the more standard `runHook preBuild`.
This commit is contained in:
parent
551cee25b6
commit
a7d1474023
|
@ -61,19 +61,18 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
|
||||||
ln -s "$NIX_BUILD_TOP/$sourceRoot" "$NIX_BUILD_TOP/working/$ename"
|
ln -s "$NIX_BUILD_TOP/$sourceRoot" "$NIX_BUILD_TOP/working/$ename"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase =
|
buildPhase = ''
|
||||||
''
|
runHook preBuild
|
||||||
runHook preBuild
|
|
||||||
|
|
||||||
cd "$NIX_BUILD_TOP"
|
cd "$NIX_BUILD_TOP"
|
||||||
|
|
||||||
emacs --batch -Q \
|
emacs --batch -Q \
|
||||||
-L "$melpa/package-build" \
|
-L "$melpa/package-build" \
|
||||||
-l "$melpa2nix" \
|
-l "$melpa2nix" \
|
||||||
-f melpa2nix-build-package \
|
-f melpa2nix-build-package \
|
||||||
$ename $version
|
$ename $version
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -7,27 +7,22 @@ with lib;
|
||||||
args:
|
args:
|
||||||
|
|
||||||
import ./generic.nix envargs ({
|
import ./generic.nix envargs ({
|
||||||
#preConfigure = ''
|
|
||||||
# export LISPDIR=$out/share/emacs/site-lisp
|
|
||||||
# export VERSION_SPECIFIC_LISPDIR=$out/share/emacs/site-lisp
|
|
||||||
#'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
eval "$preBuild"
|
runHook preBuild
|
||||||
|
|
||||||
emacs -L . --batch -f batch-byte-compile *.el
|
emacs -L . --batch -f batch-byte-compile *.el
|
||||||
|
|
||||||
eval "$postBuild"
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
eval "$preInstall"
|
runHook preInstall
|
||||||
|
|
||||||
LISPDIR=$out/share/emacs/site-lisp
|
LISPDIR=$out/share/emacs/site-lisp
|
||||||
install -d $LISPDIR
|
install -d $LISPDIR
|
||||||
install *.el *.elc $LISPDIR
|
install *.el *.elc $LISPDIR
|
||||||
|
|
||||||
eval "$postInstall"
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue