diff options
| author | Anderson Torres <anderson.torres.8519@gmail.com> | 2025-10-27 11:16:28 -0300 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-04-20 12:42:04 +0900 |
| commit | d1011b548fe150e14f81a677f8d469762bc03f6e (patch) | |
| tree | 8b86e9e1211d60c37bf4bc8052a45b924b2aab0d | |
| parent | 3814cc1da9b0496285acfb904357807f957564fe (diff) | |
gnu: nvi: Reformat.
* gnu/packages/nvi.scm (nvi)[source]: Reduce indentation,
reformat uri, use G-expression snippet.
[inputs]: Remove newline.
[description]: Reduce indentation, limit width to 72 columns.
[home-page]: Update.
[license]: Add prefix.
Change-Id: I0f8068a7f204a817deb02ac0dc179bde47d96d58
Reviewed-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
| -rw-r--r-- | gnu/packages/nvi.scm | 81 |
1 files changed, 40 insertions, 41 deletions
diff --git a/gnu/packages/nvi.scm b/gnu/packages/nvi.scm index c13e131223b..114a7490731 100644 --- a/gnu/packages/nvi.scm +++ b/gnu/packages/nvi.scm | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #:use-module (guix download) | 28 | #:use-module (guix download) |
| 29 | #:use-module (guix build-system gnu) | 29 | #:use-module (guix build-system gnu) |
| 30 | #:use-module (guix gexp) | 30 | #:use-module (guix gexp) |
| 31 | #:use-module (guix licenses) | 31 | #:use-module ((guix licenses) #:prefix license:) |
| 32 | #:use-module (guix utils)) | 32 | #:use-module (guix utils)) |
| 33 | 33 | ||
| 34 | (define-public nvi | 34 | (define-public nvi |
| @@ -36,37 +36,35 @@ | |||
| 36 | (name "nvi") | 36 | (name "nvi") |
| 37 | (version "1.81.6") | 37 | (version "1.81.6") |
| 38 | (source | 38 | (source |
| 39 | (origin | 39 | (origin |
| 40 | (method url-fetch) | 40 | (method url-fetch) |
| 41 | (uri ;; sites.google.coma/bostic.com/keithbostic/vi is stale. | 41 | ;; The home-page does not provide the latest version. |
| 42 | (string-append "http://harrier.slackbuilds.org/misc/nvi-" version | 42 | (uri (string-append "http://harrier.slackbuilds.org/misc/nvi-" |
| 43 | ".tar.bz2")) | 43 | version ".tar.bz2")) |
| 44 | (sha256 | 44 | (sha256 |
| 45 | (base32 "0nbbs1inyrqds0ywn3ln5slv54v5zraq7lszkg8nsavv4kivhh9l")) | 45 | (base32 "0nbbs1inyrqds0ywn3ln5slv54v5zraq7lszkg8nsavv4kivhh9l")) |
| 46 | (patches (search-patches "nvi-assume-preserve-path.patch" | 46 | (patches (search-patches "nvi-assume-preserve-path.patch" |
| 47 | "nvi-dbpagesize-binpower.patch" | 47 | "nvi-dbpagesize-binpower.patch" |
| 48 | "nvi-add-function-prototypes.patch" | 48 | "nvi-add-function-prototypes.patch" |
| 49 | "nvi-db4.patch")) | 49 | "nvi-db4.patch")) |
| 50 | (modules '((guix build utils))) | 50 | (modules '((guix build utils))) |
| 51 | (snippet | 51 | (snippet |
| 52 | ;; Create a wrapper for the configure script, make it executable. | 52 | ;; Create a wrapper for the configure script, make it executable. |
| 53 | '(let ((conf-wrap (open-output-file "configure"))) | 53 | #~(let ((conf-wrap (open-output-file "configure"))) |
| 54 | (display "#!/bin/sh" conf-wrap) | 54 | (display "#!/bin/sh" conf-wrap) |
| 55 | (newline conf-wrap) | 55 | (newline conf-wrap) |
| 56 | (display | 56 | (display |
| 57 | "../nvi-1.81.6/dist/configure --srcdir=../nvi-1.81.6/dist $@" | 57 | "../nvi-1.81.6/dist/configure --srcdir=../nvi-1.81.6/dist $@" |
| 58 | conf-wrap) | 58 | conf-wrap) |
| 59 | (newline conf-wrap) | 59 | (newline conf-wrap) |
| 60 | (close-output-port conf-wrap) | 60 | (close-output-port conf-wrap) |
| 61 | (chmod "configure" #o0755) | 61 | (chmod "configure" #o0755) |
| 62 | |||
| 63 | ;; Glibc 2.30 removed the deprecated <sys/stropts.h>, so fall back | ||
| 64 | ;; to the internal PTY allocation logic. | ||
| 65 | (substitute* "ex/ex_script.c" | ||
| 66 | (("#ifdef HAVE_SYS5_PTY") | ||
| 67 | "#if defined(HAVE_SYS5_PTY) && !defined(__GLIBC__)")) | ||
| 68 | #t)))) | ||
| 69 | 62 | ||
| 63 | ;; Glibc 2.30 removed the deprecated <sys/stropts.h>, so fall back | ||
| 64 | ;; to the internal PTY allocation logic. | ||
| 65 | (substitute* "ex/ex_script.c" | ||
| 66 | (("#ifdef HAVE_SYS5_PTY") | ||
| 67 | "#if defined(HAVE_SYS5_PTY) && !defined(__GLIBC__)")))))) | ||
| 70 | (build-system gnu-build-system) | 68 | (build-system gnu-build-system) |
| 71 | (arguments | 69 | (arguments |
| 72 | (list | 70 | (list |
| @@ -101,17 +99,18 @@ | |||
| 101 | file) | 99 | file) |
| 102 | ".")) | 100 | ".")) |
| 103 | '("config.sub" "config.guess")))))))) | 101 | '("config.sub" "config.guess")))))))) |
| 104 | (inputs | 102 | (inputs (list bdb ncurses)) |
| 105 | (list bdb ncurses)) | ||
| 106 | (native-inputs | 103 | (native-inputs |
| 107 | (list automake)) ;Up to date 'config.guess' and 'config.sub'. | 104 | (list automake)) ;Up to date 'config.guess' and 'config.sub'. |
| 108 | (synopsis "The Berkeley Vi Editor") | 105 | (synopsis "The Berkeley Vi Editor") |
| 109 | (description | 106 | (description |
| 110 | "Vi is the original screen based text editor for Unix systems. It is | 107 | "Vi is the original screen based text editor for Unix systems. It |
| 111 | considered the standard text editor, and is available on almost all Unix | 108 | is considered the standard text editor, and is available on almost all |
| 112 | systems. Nvi is intended as a \"bug-for-bug compatible\" clone of the | 109 | Unix systems. Nvi is intended as a \"bug-for-bug compatible\" clone of |
| 113 | original BSD vi editor. As such, it doesn't have a lot of snazzy features as | 110 | the original BSD vi editor. As such, it doesn't have a lot of snazzy |
| 114 | do some of the other vi clones such as elvis and vim. However, if all you | 111 | features as do some of the other vi clones such as elvis and vim. |
| 115 | want is vi, this is the one to get.") | 112 | However, if all you want is vi, this is the one to get.") |
| 116 | (home-page "https://sites.google.com/a/bostic.com/keithbostic/vi") | 113 | (home-page |
| 117 | (license bsd-3))) | 114 | (string-append "https://sites.google.com/a/bostic.com/keithbostic/" |
| 115 | "the-berkeley-vi-editor-home-page")) | ||
| 116 | (license license:bsd-3))) | ||
