1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: patch/pinned: Drop it in favor of patch.

* gnu/packages/base.scm (patch/pinned): Drop package.
(patch)[inherit]: Drop inheritance.
[arguments]: Rewrite them without inheritance.
[native-inputs, synopsis, description, home-page, license]
[build-system]: Copy fields.

Change-Id: I01608f4df0fedef67de55b44a3b41dc378ebadf0
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Nicolas Graves
2026-02-22 02:19:24 +01:00
committed by Ludovic Courtès
parent 74445bfa5e
commit f61274db0c
4 changed files with 33 additions and 50 deletions

View File

@@ -307,41 +307,8 @@ standard utility.")
(license gpl3+)
(home-page "https://www.gnu.org/software/tar/")))
;;; TODO: Replace/merge with 'patch' on core-updates.
(define-public patch/pinned
(hidden-package
(package
(name "patch")
(version "2.7.6")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/patch/patch-"
version ".tar.xz"))
(sha256
(base32
"1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc"))
(patches (search-patches "patch-hurd-path-max.patch"))))
(build-system gnu-build-system)
(arguments
;; Work around a cross-compilation bug whereby libpatch.a would provide
;; '__mktime_internal', which conflicts with the one in libc.a.
(if (%current-target-system)
`(#:configure-flags '("gl_cv_func_working_mktime=yes"))
'()))
(native-inputs (list ed))
(synopsis "Apply differences to originals, with optional backups")
(description
"Patch is a program that applies changes to files based on differences
laid out as by the program \"diff\". The changes may be applied to one or more
files depending on the contents of the diff file. It accepts several
different diff formats. It may also be used to revert previously applied
differences.")
(license gpl3+)
(home-page "https://savannah.gnu.org/projects/patch/"))))
(define-public patch
(package
(inherit patch/pinned)
(name "patch")
(version "2.8")
(source (origin
@@ -351,13 +318,27 @@ differences.")
(sha256
(base32
"1qssgwgy3mfahkpgg99a35gl38vamlqb15m3c2zzrd62xrlywz7q"))))
(build-system gnu-build-system)
(arguments
(substitute-keyword-arguments (package-arguments patch/pinned)
((#:configure-flags flags #~'())
(if (target-hurd32?)
#~(cons* "--disable-year2038"
#$flags)
flags))))
(list
#:configure-flags
#~(append
(if #$(%current-target-system)
(list "gl_cv_func_working_mktime=yes")
'())
(if #$(target-hurd32?)
(list "--disable-year2038")
'()))))
(native-inputs (list ed))
(synopsis "Apply differences to originals, with optional backups")
(description
"Patch is a program that applies changes to files based on differences
laid out as by the program \"diff\". The changes may be applied to one or more
files depending on the contents of the diff file. It accepts several
different diff formats. It may also be used to revert previously applied
differences.")
(license gpl3+)
(home-page "https://savannah.gnu.org/projects/patch/")
(properties '())))
(define-public diffutils

View File

@@ -844,7 +844,7 @@ MesCC-Tools), and finally M2-Planet.")
(define patch-mesboot
;; The initial patch.
(package
(inherit patch/pinned)
(inherit patch)
(name "patch-mesboot")
(version "2.5.9")
(source (origin
@@ -2170,19 +2170,21 @@ exec " gcc "/bin/" program
(define patch-boot0
(package
(inherit patch/pinned)
(source (bootstrap-origin (package-source patch/pinned)))
(inherit patch)
(source (bootstrap-origin (package-source patch)))
(name "patch-boot0")
(native-inputs '())
(inputs
`(("make" ,gnu-make-boot0)
,@(%bootstrap-inputs+toolchain)))
(arguments
`(#:tests? #f ; merge test fails
#:implicit-inputs? #f
#:guile ,%bootstrap-guile
#:strip-binaries? #f
#:validate-runpath? #f))))
(list
#:tests? #f ; merge test fails
#:implicit-inputs? #f
#:guile %bootstrap-guile
#:strip-binaries? #f
#:validate-runpath? #f
#:configure-flags #~(list "--disable-year2038")))))
(define sed-boot0
(package
@@ -3563,7 +3565,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
("bzip2" ,bzip2)
("file" ,file)
("diffutils" ,diffutils)
("patch" ,patch/pinned)
("patch" ,patch)
("findutils" ,findutils)
("gawk" ,(package/inherit gawk
(native-inputs

View File

@@ -495,7 +495,7 @@ interface.")
(build-system trivial-build-system)
(native-inputs
`(("config-patch" ,@(search-patches "cl-asdf-config-directories.patch"))
("patch" ,patch/pinned)))
("patch" ,patch)))
(arguments
`(#:modules ((guix build utils)
(guix build lisp-utils))

View File

@@ -964,7 +964,7 @@ identifiers. The result is inferred from the file names of patches."
("gzip" ,(ref '(gnu packages compression) 'gzip))
("lzip" ,(ref '(gnu packages compression) 'lzip))
("unzip" ,(ref '(gnu packages compression) 'unzip))
("patch" ,(ref '(gnu packages base) 'patch/pinned)))))
("patch" ,(ref '(gnu packages base) 'patch)))))
(define (default-guile)
"Return the default Guile package used to run the build code of