| 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 | (define-module (gnu packages zile)
|
| 26 | #:use-module (guix licenses)
|
| 27 | #:use-module (guix download)
|
| 28 | #:use-module (guix git-download)
|
| 29 | #:use-module (guix packages)
|
| 30 | #:use-module (guix utils)
|
| 31 | #:use-module (guix build-system gnu)
|
| 32 | #:use-module (gnu packages autotools)
|
| 33 | #:use-module (gnu packages bash)
|
| 34 | #:use-module (gnu packages bdw-gc)
|
| 35 | #:use-module (gnu packages glib)
|
| 36 | #:use-module (gnu packages guile)
|
| 37 | #:use-module (gnu packages gnome)
|
| 38 | #:use-module (gnu packages gnupg)
|
| 39 | #:use-module (gnu packages m4)
|
| 40 | #:use-module (gnu packages man)
|
| 41 | #:use-module (gnu packages ncurses)
|
| 42 | #:use-module (gnu packages perl)
|
| 43 | #:use-module (gnu packages pkg-config)
|
| 44 | #:use-module (gnu packages version-control))
|
| 45 |
|
| 46 | (define-public zile
|
| 47 | (package
|
| 48 | (name "zile")
|
| 49 | (version "2.6.4")
|
| 50 | (source (origin
|
| 51 | (method url-fetch)
|
| 52 | (uri (string-append "mirror://gnu/zile/zile-"
|
| 53 | version ".tar.gz"))
|
| 54 | (sha256
|
| 55 | (base32
|
| 56 | "1h2pxsp5rdkr2i4akfpayv19had3yf3226kyf38461j9rf2lpm6m"))))
|
| 57 | (build-system gnu-build-system)
|
| 58 | (arguments
|
| 59 | `(#:configure-flags
|
| 60 | '("CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types")
|
| 61 | #:phases
|
| 62 | (modify-phases %standard-phases
|
| 63 | (add-before 'configure 'patch-/bin/sh
|
| 64 | (lambda* (#:key inputs #:allow-other-keys)
|
| 65 | (let ((bash (assoc-ref inputs "bash")))
|
| 66 | |
| 67 | (substitute* '("src/shell.c")
|
| 68 | (("/bin/sh")
|
| 69 | (string-append bash "/bin/sh")))
|
| 70 | #t)))
|
| 71 | |
| 72 | |
| 73 | |
| 74 | ,@(if (%current-target-system)
|
| 75 | '((add-before 'build 'use-native-zile-for-documentation
|
| 76 | (lambda _
|
| 77 | (substitute* "build-aux/zile-help2man-wrapper"
|
| 78 | (("src/zile")
|
| 79 | (which "zile")))
|
| 80 | #t)))
|
| 81 | '()))))
|
| 82 | (inputs
|
| 83 | `(("boehm-gc" ,libgc)
|
| 84 | ("ncurses" ,ncurses)
|
| 85 | ("bash" ,bash)
|
| 86 | ("gee" ,libgee)
|
| 87 | ("glib" ,glib)))
|
| 88 | (native-inputs
|
| 89 | `(("perl" ,perl)
|
| 90 | ("help2man" ,help2man)
|
| 91 | |
| 92 | |
| 93 | ,@(if (%current-target-system)
|
| 94 | `(("self" ,this-package))
|
| 95 | '())
|
| 96 | ("pkg-config" ,pkg-config)))
|
| 97 | (home-page "https://www.gnu.org/software/zile/")
|
| 98 | (synopsis "Lightweight Emacs clone")
|
| 99 | (description
|
| 100 | "GNU Zile is a lightweight Emacs clone. It usage is similar to the
|
| 101 | default Emacs configuration, but it carries a much lighter feature set.")
|
| 102 | (license gpl3+)))
|
| 103 |
|
| 104 | (define-public zile-on-guile
|
| 105 | |
| 106 | |
| 107 | (let ((commit "fd097811a60e58696d734c35b0eb7da3afc1adb7")
|
| 108 | (revision "0"))
|
| 109 | (package
|
| 110 | (inherit zile)
|
| 111 | (name "zile-on-guile")
|
| 112 | (version (string-append (package-version zile)
|
| 113 | "-" revision "."
|
| 114 | (string-take commit 7)))
|
| 115 | (home-page "https://github.com/spk121/zile")
|
| 116 | (source (origin
|
| 117 | (method git-fetch)
|
| 118 | (uri (git-reference
|
| 119 | (url home-page)
|
| 120 | (commit commit)
|
| 121 | (recursive? #t))) |
| 122 | (sha256
|
| 123 | (base32
|
| 124 | "0wlli8hqal9ikmbl3a49kyhzyf164jk6mdbir3bclq2gxszs532d"))
|
| 125 | (file-name (string-append name "-" version "-checkout"))))
|
| 126 | (inputs
|
| 127 | (modify-inputs inputs
|
| 128 | (prepend guile-2.0)))
|
| 129 | (native-inputs
|
| 130 | `(("m4" ,m4) |
| 131 | ("autoconf" ,autoconf)
|
| 132 | ("automake" ,automake)
|
| 133 |
|
| 134 | |
| 135 | ("git" ,git)
|
| 136 | ("gpg" ,gnupg)
|
| 137 |
|
| 138 | ,@(package-native-inputs zile)))
|
| 139 | (arguments
|
| 140 | (substitute-keyword-arguments arguments
|
| 141 | ((#:phases phases)
|
| 142 | `(modify-phases ,phases
|
| 143 | (replace 'bootstrap
|
| 144 | (lambda _
|
| 145 | |
| 146 | |
| 147 | (for-each (lambda (file)
|
| 148 | (chmod file #o755))
|
| 149 | (find-files "."))
|
| 150 | (patch-shebang "gnulib/gnulib-tool")
|
| 151 | (invoke "sh" "./bootstrap"
|
| 152 | "--gnulib-srcdir=gnulib"
|
| 153 | "--skip-git" "--skip-po"
|
| 154 | "--verbose")))
|
| 155 | (replace 'patch-/bin/sh
|
| 156 | (lambda* (#:key inputs #:allow-other-keys)
|
| 157 | (let ((bash (assoc-ref inputs "bash")))
|
| 158 | |
| 159 | (substitute* '("lib/spawni.c" "src/funcs.c")
|
| 160 | (("/bin/sh")
|
| 161 | (string-append bash "/bin/sh")))
|
| 162 | #t)))
|
| 163 | (add-after 'install 'wrap-command
|
| 164 | (lambda* (#:key outputs #:allow-other-keys)
|
| 165 | |
| 166 | (let* ((out (assoc-ref outputs "out"))
|
| 167 | (scheme (dirname
|
| 168 | (car (find-files out "^zile\\.scm$")))))
|
| 169 | (wrap-program (string-append out "/bin/zile-on-guile")
|
| 170 | `("GUILE_LOAD_PATH" ":" prefix (,scheme)))
|
| 171 | #t)))))))
|
| 172 | (synopsis "Lightweight clone of the Emacs editor using Guile")
|
| 173 | (description
|
| 174 | "GNU Zile is a lightweight clone of the Emacs editor, and Zile-on-Guile
|
| 175 | is a variant of Zile that can be extended in Guile Scheme. Hitting
|
| 176 | @kbd{M-C} (or: @kbd{Alt} and @kbd{C}) brings up a Guile REPL from which
|
| 177 | interactive functions akin to those of Emacs can be invoked."))))
|