From 6136bc10ab89a2fb1bae29b77f6d0c32d1460e9f Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Sun, 7 Apr 2024 22:04:45 +1000 Subject: [PATCH] Make org aware of its release version This fixes version checks against Org, like the one elfeed runs after loading Org. --- elisp-packages.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/elisp-packages.nix b/elisp-packages.nix index f557d95..dbaeb6f 100644 --- a/elisp-packages.nix +++ b/elisp-packages.nix @@ -39,8 +39,6 @@ # This does not hit the same dependency problem auctex does because org is a # built-in package, and the package.el machinery assumes that satisfies the # dependency (it is not aware of our shadowing it). - # - # TODO: pass in ORGVERSION / GITVERSION (or provide a .git dir). org = esuper.trivialBuild { pname = "org"; version = "1"; @@ -52,9 +50,13 @@ # XXX this sticks stuff in $out/emacs/etc/org (datadir in default.mk) # that probably needs to go somewhere else. # Possibly same for $out/share/info/. + + # Finding ORGVERSION is a hack (based on the one in Doom). + # TODO: set GITVERSION? configurePhase = '' echo "prefix = $out" > local.mk echo "lispdir = $out/share/emacs/site-lisp/org" >> local.mk + echo "ORGVERSION = $(sed -ne 's/^;; Version: \([^\n-]\+\).*/\1/p' lisp/org.el)" >> local.mk make config ''; buildPhase = ''