From 3699c4a4fe85c4ac1884d9458c3c0b15fca11da7 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 26 Oct 2025 22:32:59 -0300 Subject: gnu: nvi: Move to (gnu packages text-editors). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/nvi.scm (nvi): Deprecate, move from here ... * gnu/packages/text-editors.scm: ... to here. Update copyright headers. * gnu/system.scm: Do not use (gnu packages nvi). Change-Id: I9968c854a7ea42b1f3288ae68a9259bd7d35c685 Merges: https://codeberg.org/guix/guix/pulls/4806 Reviewed-by: Sharlatan Hellseher Signed-off-by: Nguyễn Gia Phong --- gnu/packages/nvi.scm | 101 ++---------------------------------------- gnu/packages/text-editors.scm | 87 ++++++++++++++++++++++++++++++++++++ gnu/system.scm | 1 - 3 files changed, 91 insertions(+), 98 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/nvi.scm b/gnu/packages/nvi.scm index 114a7490731..613df6992bb 100644 --- a/gnu/packages/nvi.scm +++ b/gnu/packages/nvi.scm @@ -1,8 +1,4 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Marek Benc -;;; Copyright © 2020 Marius Bakke -;;; Copyright © 2024 Herman Rimm -;;; Copyright © 2025 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,97 +16,8 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages nvi) - #:use-module (gnu packages) - #:use-module (gnu packages autotools) - #:use-module (gnu packages dbm) - #:use-module (gnu packages ncurses) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu) - #:use-module (guix gexp) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix utils)) + #:use-module (gnu packages text-editors) + #:use-module (guix deprecation)) -(define-public nvi - (package - (name "nvi") - (version "1.81.6") - (source - (origin - (method url-fetch) - ;; The home-page does not provide the latest version. - (uri (string-append "http://harrier.slackbuilds.org/misc/nvi-" - version ".tar.bz2")) - (sha256 - (base32 "0nbbs1inyrqds0ywn3ln5slv54v5zraq7lszkg8nsavv4kivhh9l")) - (patches (search-patches "nvi-assume-preserve-path.patch" - "nvi-dbpagesize-binpower.patch" - "nvi-add-function-prototypes.patch" - "nvi-db4.patch")) - (modules '((guix build utils))) - (snippet - ;; Create a wrapper for the configure script, make it executable. - #~(let ((conf-wrap (open-output-file "configure"))) - (display "#!/bin/sh" conf-wrap) - (newline conf-wrap) - (display - "../nvi-1.81.6/dist/configure --srcdir=../nvi-1.81.6/dist $@" - conf-wrap) - (newline conf-wrap) - (close-output-port conf-wrap) - (chmod "configure" #o0755) - - ;; Glibc 2.30 removed the deprecated , so fall back - ;; to the internal PTY allocation logic. - (substitute* "ex/ex_script.c" - (("#ifdef HAVE_SYS5_PTY") - "#if defined(HAVE_SYS5_PTY) && !defined(__GLIBC__)")))))) - (build-system gnu-build-system) - (arguments - (list - #:out-of-source? #t - #:configure-flags - #~'("--enable-widechar" - #$@(if (%current-target-system) - '("vi_cv_sprintf_count=yes") - '())) - #:make-flags - #~(list - ;; Add CFLAGS to relax gcc-14's strictness. - ;; nvi's configure chokes on passing CFLAGS and ignores - ;; CFLAGS set in the environment. - (string-append "CFLAGS=-g -O2" - " -Wno-error=incompatible-pointer-types")) - #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'fix-configure - (lambda* (#:key inputs native-inputs #:allow-other-keys) - ;; Replace outdated config.sub and config.guess: - (with-directory-excursion "dist" - (for-each - (lambda (file) - (chmod file #o755) - (install-file - (format #f "~a/share/automake-~a/~a" - (assoc-ref (or native-inputs inputs) - "automake") - #$(version-major+minor - (package-version automake)) - file) - ".")) - '("config.sub" "config.guess")))))))) - (inputs (list bdb ncurses)) - (native-inputs - (list automake)) ;Up to date 'config.guess' and 'config.sub'. - (synopsis "The Berkeley Vi Editor") - (description - "Vi is the original screen based text editor for Unix systems. It -is considered the standard text editor, and is available on almost all -Unix systems. Nvi is intended as a \"bug-for-bug compatible\" clone of -the original BSD vi editor. As such, it doesn't have a lot of snazzy -features as do some of the other vi clones such as elvis and vim. -However, if all you want is vi, this is the one to get.") - (home-page - (string-append "https://sites.google.com/a/bostic.com/keithbostic/" - "the-berkeley-vi-editor-home-page")) - (license license:bsd-3))) +(define-deprecated/public-alias nvi + (@ (gnu packages text-editors) nvi)) diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index d1d44232fa3..c9252839a86 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2013, 2014 Ludovic Courtès +;;; Copyright © 2014 Marek Benc ;;; Copyright © 2015-2022, 2025 Efraim Flashner ;;; Copyright © 2016 José Miguel Sánchez García ;;; Copyright © 2016 Carlo Zancanaro @@ -42,6 +43,7 @@ ;;; Copyright © 2025 Andrew Wong ;;; Copyright © 2025 Junker ;;; Copyright © 2025 benjamin wil +;;; Copyright © 2025 Janneke Nieuwenhuizen ;;; Copyright © 2026 Ignatius Menzies ;;; ;;; This file is part of GNU Guix. @@ -92,6 +94,7 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages datastructures) + #:use-module (gnu packages dbm) #:use-module (gnu packages documentation) #:use-module (gnu packages enchant) #:use-module (gnu packages fontutils) @@ -987,6 +990,90 @@ justifying, auto-indentation, bracket matching, interactive search-and-replace (with regular expressions), and the editing of multiple files.") (license license:gpl3+))) ; some files are under GPLv2+ +(define-public nvi + (package + (name "nvi") + (version "1.81.6") + (source + (origin + (method url-fetch) + ;; The home-page does not provide the latest version. + (uri (string-append "http://harrier.slackbuilds.org/misc/nvi-" + version ".tar.bz2")) + (sha256 + (base32 "0nbbs1inyrqds0ywn3ln5slv54v5zraq7lszkg8nsavv4kivhh9l")) + (patches (search-patches "nvi-assume-preserve-path.patch" + "nvi-dbpagesize-binpower.patch" + "nvi-add-function-prototypes.patch" + "nvi-db4.patch")) + (modules '((guix build utils))) + (snippet + ;; Create a wrapper for the configure script, make it executable. + #~(let ((conf-wrap (open-output-file "configure"))) + (display "#!/bin/sh" conf-wrap) + (newline conf-wrap) + (display + "../nvi-1.81.6/dist/configure --srcdir=../nvi-1.81.6/dist $@" + conf-wrap) + (newline conf-wrap) + (close-output-port conf-wrap) + (chmod "configure" #o0755) + + ;; Glibc 2.30 removed the deprecated , so fall back + ;; to the internal PTY allocation logic. + (substitute* "ex/ex_script.c" + (("#ifdef HAVE_SYS5_PTY") + "#if defined(HAVE_SYS5_PTY) && !defined(__GLIBC__)")))))) + (build-system gnu-build-system) + (arguments + (list + #:out-of-source? #t + #:configure-flags + #~'("--enable-widechar" + #$@(if (%current-target-system) + '("vi_cv_sprintf_count=yes") + '())) + #:make-flags + #~(list + ;; Add CFLAGS to relax gcc-14's strictness. + ;; nvi's configure chokes on passing CFLAGS and ignores + ;; CFLAGS set in the environment. + (string-append "CFLAGS=-g -O2" + " -Wno-error=incompatible-pointer-types")) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess: + (with-directory-excursion "dist" + (for-each + (lambda (file) + (chmod file #o755) + (install-file + (format #f "~a/share/automake-~a/~a" + (assoc-ref (or native-inputs inputs) + "automake") + #$(version-major+minor + (package-version automake)) + file) + ".")) + '("config.sub" "config.guess")))))))) + (inputs (list bdb ncurses)) + (native-inputs + (list automake)) ;Up to date 'config.guess' and 'config.sub'. + (synopsis "The Berkeley Vi Editor") + (description + "Vi is the original screen based text editor for Unix systems. It +is considered the standard text editor, and is available on almost all +Unix systems. Nvi is intended as a \"bug-for-bug compatible\" clone of +the original BSD vi editor. As such, it doesn't have a lot of snazzy +features as do some of the other vi clones such as elvis and vim. +However, if all you want is vi, this is the one to get.") + (home-page + (string-append "https://sites.google.com/a/bostic.com/keithbostic/" + "the-berkeley-vi-editor-home-page")) + (license license:bsd-3))) + (define-public qemacs (package (name "qemacs") diff --git a/gnu/system.scm b/gnu/system.scm index d3b0cd30dad..c161961be19 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -62,7 +62,6 @@ #:use-module (gnu packages less) #:use-module (gnu packages linux) #:use-module (gnu packages man) - #:use-module (gnu packages nvi) #:use-module (gnu packages package-management) #:use-module (gnu packages pciutils) #:use-module (gnu packages texinfo) -- cgit v1.2.3