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