Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
189be331 | 2 | ;;; Copyright © 2012, 2013, 2017, 2018 Ludovic Courtès <ludo@gnu.org> |
d79ffe0e | 3 | ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> |
c11933c9 | 4 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
a0c5dafc | 5 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
fb9821f0 | 6 | ;;; |
233e7676 | 7 | ;;; This file is part of GNU Guix. |
fb9821f0 | 8 | ;;; |
233e7676 | 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fb9821f0 LC |
10 | ;;; under the terms of the GNU General Public License as published by |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
233e7676 | 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fb9821f0 LC |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fb9821f0 | 21 | |
1ffa7090 | 22 | (define-module (gnu packages zile) |
4a44e743 | 23 | #:use-module (guix licenses) |
fb9821f0 | 24 | #:use-module (guix download) |
70c63411 | 25 | #:use-module (guix git-download) |
fb9821f0 | 26 | #:use-module (guix packages) |
70c63411 | 27 | #:use-module (guix utils) |
fb9821f0 | 28 | #:use-module (guix build-system gnu) |
70c63411 LC |
29 | #:use-module (gnu packages autotools) |
30 | #:use-module (gnu packages bash) | |
1ffa7090 | 31 | #:use-module (gnu packages bdw-gc) |
70c63411 LC |
32 | #:use-module (gnu packages guile) |
33 | #:use-module (gnu packages gnupg) | |
34 | #:use-module (gnu packages m4) | |
cb3da233 | 35 | #:use-module (gnu packages man) |
834b5c80 | 36 | #:use-module (gnu packages ncurses) |
70c63411 LC |
37 | #:use-module (gnu packages perl) |
38 | #:use-module (gnu packages pkg-config) | |
39 | #:use-module (gnu packages version-control)) | |
fb9821f0 LC |
40 | |
41 | (define-public zile | |
42 | (package | |
43 | (name "zile") | |
9070ca44 | 44 | (version "2.4.14") |
834b5c80 LC |
45 | (source (origin |
46 | (method url-fetch) | |
47 | (uri (string-append "mirror://gnu/zile/zile-" | |
48 | version ".tar.gz")) | |
49 | (sha256 | |
50 | (base32 | |
9070ca44 | 51 | "0x3byaddms8l3g7igx6njycqsq98wgapysdb5c7lhcnajlkp8y3s")))) |
fb9821f0 | 52 | (build-system gnu-build-system) |
834b5c80 | 53 | (arguments |
c11933c9 EF |
54 | '(#:phases |
55 | (modify-phases %standard-phases | |
56 | (add-before 'configure 'patch-/bin/sh | |
57 | (lambda* (#:key inputs #:allow-other-keys) | |
58 | (let ((bash (assoc-ref inputs "bash"))) | |
59 | ;; Refer to the actual shell. | |
60 | (substitute* '("lib/spawni.c" "src/funcs.c") | |
61 | (("/bin/sh") | |
62 | (string-append bash "/bin/sh"))) | |
63 | #t)))))) | |
fb9821f0 LC |
64 | (inputs |
65 | `(("boehm-gc" ,libgc) | |
66 | ("ncurses" ,ncurses) | |
834b5c80 LC |
67 | ("bash" ,bash))) |
68 | (native-inputs | |
69 | `(("perl" ,perl) | |
d79ffe0e EB |
70 | ("help2man" ,help2man) |
71 | ("pkg-config" ,pkg-config))) | |
fa216a4d | 72 | (home-page "https://www.gnu.org/software/zile/") |
35b9e423 | 73 | (synopsis "Lightweight Emacs clone") |
fb9821f0 | 74 | (description |
79c311b8 LC |
75 | "GNU Zile is a lightweight Emacs clone. It usage is similar to the |
76 | default Emacs configuration, but it carries a much lighter feature set.") | |
4a44e743 | 77 | (license gpl3+))) |
70c63411 LC |
78 | |
79 | (define-public zile-on-guile | |
80 | ;; This is a fork of Zile that uses Guile, announced here: | |
81 | ;; <http://lists.gnu.org/archive/html/guile-user/2012-02/msg00033.html>. | |
82 | (let ((commit "fd097811a60e58696d734c35b0eb7da3afc1adb7") | |
83 | (revision "0")) | |
84 | (package | |
85 | (inherit zile) | |
86 | (name "zile-on-guile") | |
87 | (version (string-append (package-version zile) | |
88 | "-" revision "." | |
89 | (string-take commit 7))) | |
90 | (home-page "https://github.com/spk121/zile") | |
91 | (source (origin | |
92 | (method git-fetch) | |
93 | (uri (git-reference | |
94 | (url home-page) | |
95 | (commit commit) | |
96 | (recursive? #t))) ;for the Gnulib sub-module | |
97 | (sha256 | |
98 | (base32 | |
99 | "0wlli8hqal9ikmbl3a49kyhzyf164jk6mdbir3bclq2gxszs532d")) | |
100 | (file-name (string-append name "-" version "-checkout")))) | |
101 | (inputs | |
102 | `(("guile" ,guile-2.0) | |
103 | ,@(package-inputs zile))) | |
104 | (native-inputs | |
105 | `(("m4" ,m4) ;for 'bootstrap' | |
464f5447 | 106 | ("autoconf" ,autoconf-wrapper) |
70c63411 LC |
107 | ("automake" ,automake) |
108 | ||
109 | ;; For some reason, 'bootstrap' insists on having these. | |
110 | ("git" ,git) | |
111 | ("gpg" ,gnupg) | |
112 | ||
113 | ,@(package-native-inputs zile))) | |
114 | (arguments | |
115 | (substitute-keyword-arguments (package-arguments zile) | |
116 | ((#:phases phases) | |
117 | `(modify-phases ,phases | |
189be331 | 118 | (replace 'bootstrap |
70c63411 LC |
119 | (lambda _ |
120 | ;; Make sure all the files are writable so that ./bootstrap | |
121 | ;; can proceed. | |
122 | (for-each (lambda (file) | |
123 | (chmod file #o755)) | |
124 | (find-files ".")) | |
125 | (patch-shebang "gnulib/gnulib-tool") | |
a0c5dafc TGR |
126 | (invoke "sh" "./bootstrap" |
127 | "--gnulib-srcdir=gnulib" | |
128 | "--skip-git" "--skip-po" | |
129 | "--verbose"))) | |
70c63411 LC |
130 | (add-after 'install 'wrap-command |
131 | (lambda* (#:key outputs #:allow-other-keys) | |
132 | ;; Add zile.scm to the search path. | |
133 | (let* ((out (assoc-ref outputs "out")) | |
134 | (scheme (dirname | |
135 | (car (find-files out "^zile\\.scm$"))))) | |
136 | (wrap-program (string-append out "/bin/zile-on-guile") | |
137 | `("GUILE_LOAD_PATH" ":" prefix (,scheme))) | |
138 | #t))))))) | |
139 | (synopsis "Lightweight clone of the Emacs editor using Guile") | |
140 | (description | |
141 | "GNU Zile is a lightweight clone of the Emacs editor, and Zile-on-Guile | |
142 | is a variant of Zile that can be extended in Guile Scheme. Hitting | |
143 | @kbd{M-C} (or: @kbd{Alt} and @kbd{C}) brings up a Guile REPL from which | |
144 | interactive functions akin to those of Emacs can be invoked.")))) |