From 2981ad0a2797f4cde8e2090f7d1ce2ee22bd1e5d Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Thu, 19 Sep 2024 20:08:32 +0900 Subject: [PATCH] feat: Expose a function to build a single Emacs Lisp package --- lib/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/default.nix b/lib/default.nix index 23013c3..8e9f196 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -41,4 +41,18 @@ in (split "\n") (filter (s: isString s && s != "")) ]; + + # A function that builds a single Emacs Lisp package. The argument should be + # an attribute set that takes the same form as an entry value in + # packageInputs. Most attributes for basic usage are self-explanatory, but it + # requires elispInputs, which is a list of derivations that contain Emacs Lisp + # source files in share/emacs/site-lisp directory and (optional) + # native-compiled libraries in share/emacs/native-lisp directory. + buildElispPackage = + pkgs: + pkgs.callPackage ../pkgs/emacs/build { + lib = import ../pkgs/build-support { + inherit inputs pkgs; + }; + }; }