about summary refs log tree commit diff
path: root/arunisaac/emacs.scm
blob: eed477aeb8bd89ccc7e261bb826119621ba9d34b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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