gnu: ruby-pandoc-ruby: Use pandoc instead of ghc-pandoc.
[jackhill/guix/guix.git] / gnu / packages / nvi.scm
CommitLineData
bf2a56f8
MB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Marek Benc <merkur32@gmail.com>
3440fecd 3;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
bf2a56f8
MB
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages nvi)
21 #:use-module (gnu packages)
255d1bbe 22 #:use-module (gnu packages dbm)
bf2a56f8
MB
23 #:use-module (gnu packages ncurses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix licenses))
28
29(define-public nvi
30 (package
31 (name "nvi")
32 (version "1.81.6")
33 (source
34 (origin
35 (method url-fetch)
36 (uri ;; sites.google.coma/bostic.com/keithbostic/vi is stale.
37 (string-append "http://harrier.slackbuilds.org/misc/nvi-" version
38 ".tar.bz2"))
39 (sha256
40 (base32 "0nbbs1inyrqds0ywn3ln5slv54v5zraq7lszkg8nsavv4kivhh9l"))
fc1adab1
AK
41 (patches (search-patches "nvi-assume-preserve-path.patch"
42 "nvi-dbpagesize-binpower.patch"
43 "nvi-db4.patch"))
3440fecd 44 (modules '((guix build utils)))
bf2a56f8
MB
45 (snippet
46 ;; Create a wrapper for the configure script, make it executable.
47 '(let ((conf-wrap (open-output-file "configure")))
48 (display "#!/bin/sh" conf-wrap)
49 (newline conf-wrap)
50 (display
51 "../nvi-1.81.6/dist/configure --srcdir=../nvi-1.81.6/dist $@"
52 conf-wrap)
53 (newline conf-wrap)
54 (close-output-port conf-wrap)
6cbee49d 55 (chmod "configure" #o0755)
3440fecd
MB
56
57 ;; Glibc 2.30 removed the deprecated <sys/stropts.h>, so fall back
58 ;; to the internal PTY allocation logic.
59 (substitute* "ex/ex_script.c"
60 (("#ifdef HAVE_SYS5_PTY")
61 "#if defined(HAVE_SYS5_PTY) && !defined(__GLIBC__)"))
6cbee49d 62 #t))))
bf2a56f8
MB
63
64 (build-system gnu-build-system)
65 (arguments
4564782c
LF
66 `(#:out-of-source? #t
67 #:configure-flags '("--enable-widechar")))
bf2a56f8
MB
68 (inputs
69 `(("bdb" ,bdb)
70 ("ncurses" ,ncurses)))
71 (synopsis "The Berkeley Vi Editor")
72 (description
73 "Vi is the original screen based text editor for Unix systems. It is
74considered the standard text editor, and is available on almost all Unix
75systems. Nvi is intended as a \"bug-for-bug compatible\" clone of the original
76BSD vi editor. As such, it doesn't have a lot of snazzy features as do some
77of the other vi clones such as elvis and vim. However, if all you want is vi,
78this is the one to get.")
79 (home-page "https://sites.google.com/a/bostic.com/keithbostic/vi")
80 (license bsd-3)))