nvi.scm 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. (define-module (gnu packages nvi)
  19. #:use-module (gnu packages)
  20. #:use-module (gnu packages databases)
  21. #:use-module (gnu packages ncurses)
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system gnu)
  25. #:use-module (guix licenses))
  26. (define-public nvi
  27. (package
  28. (name "nvi")
  29. (version "1.81.6")
  30. (source
  31. (origin
  32. (method url-fetch)
  33. (uri ;; sites.google.coma/bostic.com/keithbostic/vi is stale.
  34. (string-append "http://harrier.slackbuilds.org/misc/nvi-" version
  35. ".tar.bz2"))
  36. (sha256
  37. (base32 "0nbbs1inyrqds0ywn3ln5slv54v5zraq7lszkg8nsavv4kivhh9l"))
  38. (patches (search-patches "nvi-assume-preserve-path.patch"
  39. "nvi-dbpagesize-binpower.patch"
  40. "nvi-db4.patch"))
  41. (snippet
  42. ;; Create a wrapper for the configure script, make it executable.
  43. '(let ((conf-wrap (open-output-file "configure")))
  44. (display "#!/bin/sh" conf-wrap)
  45. (newline conf-wrap)
  46. (display
  47. "../nvi-1.81.6/dist/configure --srcdir=../nvi-1.81.6/dist $@"
  48. conf-wrap)
  49. (newline conf-wrap)
  50. (close-output-port conf-wrap)
  51. (chmod "configure" #o0755)))))
  52. (build-system gnu-build-system)
  53. (arguments
  54. `(#:out-of-source? #t))
  55. (inputs
  56. `(("bdb" ,bdb)
  57. ("ncurses" ,ncurses)))
  58. (synopsis "The Berkeley Vi Editor")
  59. (description
  60. "Vi is the original screen based text editor for Unix systems. It is
  61. considered the standard text editor, and is available on almost all Unix
  62. systems. Nvi is intended as a \"bug-for-bug compatible\" clone of the original
  63. BSD vi editor. As such, it doesn't have a lot of snazzy features as do some
  64. of the other vi clones such as elvis and vim. However, if all you want is vi,
  65. this is the one to get.")
  66. (home-page "https://sites.google.com/a/bostic.com/keithbostic/vi")
  67. (license bsd-3)))