about summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs/build-support/trivial.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/emacs/build-support/trivial.nix')
-rw-r--r--pkgs/applications/editors/emacs/build-support/trivial.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/applications/editors/emacs/build-support/trivial.nix b/pkgs/applications/editors/emacs/build-support/trivial.nix
new file mode 100644
index 0000000000000..11c28c0133e40
--- /dev/null
+++ b/pkgs/applications/editors/emacs/build-support/trivial.nix
@@ -0,0 +1,28 @@
+# trivial builder for Emacs packages
+
+{ callPackage, lib, ... }@envargs:
+
+args:
+
+callPackage ./generic.nix envargs ({
+  buildPhase = ''
+    runHook preBuild
+
+    emacs -L . --batch -f batch-byte-compile *.el
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    LISPDIR=$out/share/emacs/site-lisp
+    install -d $LISPDIR
+    install *.el *.elc $LISPDIR
+    emacs --batch -l package --eval "(package-generate-autoloads \"${args.pname}\" \"$LISPDIR\")"
+
+    runHook postInstall
+  '';
+}
+
+// args)