about summary refs log tree commit diff
path: root/arunisaac/emacs.scm
diff options
context:
space:
mode:
Diffstat (limited to 'arunisaac/emacs.scm')
-rw-r--r--arunisaac/emacs.scm82
1 files changed, 82 insertions, 0 deletions
diff --git a/arunisaac/emacs.scm b/arunisaac/emacs.scm
new file mode 100644
index 0000000..eed477a
--- /dev/null
+++ b/arunisaac/emacs.scm
@@ -0,0 +1,82 @@
+;;; guix-arunisaac --- arunisaac's Guix odds and ends
+;;; Copyright © 2025 Arun Isaac <arunisaac@systemreboot.net>
+;;;
+;;; This file is part of guix-arunisaac.
+;;;
+;;; guix-arunisaac is free software: you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation, either version 3 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; guix-arunisaac is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with guix-arunisaac.  If not, see
+;;; <https://www.gnu.org/licenses/>.
+
+(define-module (arunisaac emacs)
+  #:use-module ((gnu packages emacs) #:select (emacs))
+  #:use-module ((gnu packages emacs-xyz)
+                #:select (emacs-htmlize emacs-memoize emacs-org emacs-simple-httpd emacs-xmlgen))
+  #:use-module ((gnu packages image) #:select (libjpeg-turbo optipng))
+  #:use-module ((gnu packages imagemagick) #:select (imagemagick))
+  #:use-module (guix build-system emacs)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages))
+
+(define-public emacs-ennum
+  (let ((commit "577741d3691a4ac45f460c2f59d70a2e79c9158c")
+        (revision "4"))
+    (package
+      (name "emacs-ennum")
+      (version (git-version "0.1.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                       (url "https://git.systemreboot.net/ennum/")
+                       (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0fm7mywmkxwp33xfgvnbarfx4pzjmfz47dpxqvxqvp3j88mq3gqs"))))
+      (build-system emacs-build-system)
+      (arguments
+       (list #:emacs emacs ;; An Emacs with imagemagick support is
+                           ;; required. Hence, we cannot use
+                           ;; emacs-minimal.
+             #:phases
+             #~(modify-phases %standard-phases
+                 (add-after 'unpack 'configure
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (emacs-substitute-variables "ennum-image.el"
+                       ("ennum-image-convert-path"
+                        (search-input-file inputs "/bin/convert"))
+                       ("ennum-image-identify-path"
+                        (search-input-file inputs "/bin/identify"))
+                       ("ennum-image-jpegtran-path"
+                        (search-input-file inputs "/bin/jpegtran"))
+                       ("ennum-image-optipng-path"
+                        (search-input-file inputs "/bin/optipng"))))))))
+      (inputs
+       (list imagemagick
+             libjpeg-turbo
+             optipng))
+      (propagated-inputs
+       (list emacs-htmlize
+             emacs-memoize
+             emacs-org
+             emacs-simple-httpd
+             emacs-xmlgen))
+      (home-page "https://git.systemreboot.net/ennum/about/")
+      (synopsis "Org-mode static blog generator")
+      (description "ennum is a purely functional Org Mode based static blog generator
+written in Emacs Lisp.  It is intended as a complete blog-specific
+replacement for the org-publish system.")
+      (license license:gpl3+))))
+
+emacs-ennum