diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 238f02816e..7a478367f4 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -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 diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index a38f933122..14ce8ddb01 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -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 diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 1852ef8286..becfc79125 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -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)) diff --git a/guix/packages.scm b/guix/packages.scm index 9168ae14d7..d73e3ab2c3 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -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