about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2018-11-27 00:23:04 -0500
committerBenjamin Hipple <bhipple@protonmail.com>2018-11-27 00:23:04 -0500
commita7d14740239dc3f3f8e4de2c872056f6414466da (patch)
tree016b38f63d6fe2eb326a2ed3c5e64f39874666fc /pkgs/build-support
parent551cee25b6751897fe34975ca60ac6636601ed9a (diff)
downloadnixlib-a7d14740239dc3f3f8e4de2c872056f6414466da.tar
nixlib-a7d14740239dc3f3f8e4de2c872056f6414466da.tar.gz
nixlib-a7d14740239dc3f3f8e4de2c872056f6414466da.tar.bz2
nixlib-a7d14740239dc3f3f8e4de2c872056f6414466da.tar.lz
nixlib-a7d14740239dc3f3f8e4de2c872056f6414466da.tar.xz
nixlib-a7d14740239dc3f3f8e4de2c872056f6414466da.tar.zst
nixlib-a7d14740239dc3f3f8e4de2c872056f6414466da.zip
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`.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/emacs/melpa.nix19
-rw-r--r--pkgs/build-support/emacs/trivial.nix13
2 files changed, 13 insertions, 19 deletions
diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix
index 2ee99ce973ef..eeb4d19f7acb 100644
--- a/pkgs/build-support/emacs/melpa.nix
+++ b/pkgs/build-support/emacs/melpa.nix
@@ -61,19 +61,18 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
     ln -s "$NIX_BUILD_TOP/$sourceRoot" "$NIX_BUILD_TOP/working/$ename"
   '';
 
-  buildPhase =
-    ''
-      runHook preBuild
+  buildPhase = ''
+    runHook preBuild
 
-      cd "$NIX_BUILD_TOP"
+    cd "$NIX_BUILD_TOP"
 
-      emacs --batch -Q \
-          -L "$melpa/package-build" \
-          -l "$melpa2nix" \
-          -f melpa2nix-build-package \
-          $ename $version
+    emacs --batch -Q \
+        -L "$melpa/package-build" \
+        -l "$melpa2nix" \
+        -f melpa2nix-build-package \
+        $ename $version
 
-      runHook postBuild
+    runHook postBuild
     '';
 
   installPhase = ''
diff --git a/pkgs/build-support/emacs/trivial.nix b/pkgs/build-support/emacs/trivial.nix
index 98463c56ba96..396c971b2f01 100644
--- a/pkgs/build-support/emacs/trivial.nix
+++ b/pkgs/build-support/emacs/trivial.nix
@@ -7,27 +7,22 @@ with lib;
 args:
 
 import ./generic.nix envargs ({
-  #preConfigure = ''
-  #  export LISPDIR=$out/share/emacs/site-lisp
-  #  export VERSION_SPECIFIC_LISPDIR=$out/share/emacs/site-lisp
-  #'';
-
   buildPhase = ''
-    eval "$preBuild"
+    runHook preBuild
 
     emacs -L . --batch -f batch-byte-compile *.el
 
-    eval "$postBuild"
+    runHook postBuild
   '';
 
   installPhase = ''
-    eval "$preInstall"
+    runHook preInstall
 
     LISPDIR=$out/share/emacs/site-lisp
     install -d $LISPDIR
     install *.el *.elc $LISPDIR
 
-    eval "$postInstall"
+    runHook postInstall
   '';
 }