diff options
-rw-r--r-- | gnu-system.am | 2 | ||||
-rw-r--r-- | gnu/packages/autotools.scm | 52 | ||||
-rw-r--r-- | gnu/packages/base.scm | 84 | ||||
-rw-r--r-- | gnu/packages/bootstrap.scm | 12 | ||||
-rw-r--r-- | gnu/packages/m4.scm | 7 | ||||
-rw-r--r-- | gnu/packages/multiprecision.scm | 4 | ||||
-rw-r--r-- | gnu/packages/patches/glibc-make-4.0.patch | 12 | ||||
-rw-r--r-- | gnu/packages/patches/tar-gets-undeclared.patch | 26 | ||||
-rw-r--r-- | gnu/packages/perl.scm | 5 | ||||
-rw-r--r-- | gnu/packages/readline.scm | 11 | ||||
-rw-r--r-- | guix/build-system/cmake.scm | 3 | ||||
-rw-r--r-- | guix/build-system/gnu.scm | 6 | ||||
-rw-r--r-- | guix/build-system/python.scm | 5 | ||||
-rw-r--r-- | guix/build/gnu-build-system.scm | 10 | ||||
-rw-r--r-- | guix/build/utils.scm | 2 | ||||
-rw-r--r-- | guix/packages.scm | 26 |
16 files changed, 123 insertions, 144 deletions
diff --git a/gnu-system.am b/gnu-system.am index 4a8414951b..a2377fd6e7 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -224,6 +224,7 @@ dist_patch_DATA = \ gnu/packages/patches/glib-tests-prlimit.patch \ gnu/packages/patches/glibc-bootstrap-system.patch \ gnu/packages/patches/glibc-ldd-x86_64.patch \ + gnu/packages/patches/glibc-make-4.0.patch \ gnu/packages/patches/glibc-no-ld-so-cache.patch \ gnu/packages/patches/grub-gets-undeclared.patch \ gnu/packages/patches/gstreamer-0.10-bison3.patch \ @@ -249,7 +250,6 @@ dist_patch_DATA = \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/ripperx-libm.patch \ gnu/packages/patches/scheme48-tests.patch \ - gnu/packages/patches/tar-gets-undeclared.patch \ gnu/packages/patches/tcsh-fix-autotest.patch \ gnu/packages/patches/teckit-cstdio.patch \ gnu/packages/patches/valgrind-glibc.patch \ diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index ab0c7dcbdf..bcab4e37cd 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -216,7 +216,8 @@ simplifying the entire process for the developer.") version ".tar.gz")) (sha256 (base32 - "0649qfpzkswgcj9vqkkr9rn4nlcx80faxpyqscy2k1x9c94f93dk")))) + "0649qfpzkswgcj9vqkkr9rn4nlcx80faxpyqscy2k1x9c94f93dk")) + (patches (list (search-patch "libtool-skip-tests.patch"))))) (build-system gnu-build-system) (native-inputs `(("m4" ,m4) ("perl" ,perl))) @@ -228,33 +229,30 @@ simplifying the entire process for the developer.") "out")) ; libltdl.so, ltdl.h, etc. (arguments - `(#:patches (list (assoc-ref %build-inputs "patch/skip-tests")) - ,@(if (%current-target-system) - '() ; no `check' phase when cross-building - '(#:phases (alist-cons-before - 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - ;; Run the test suite in parallel, if possible. - (let ((ncores - (cond - ((getenv "NIX_BUILD_CORES") - => - (lambda (n) - (if (zero? (string->number n)) - (number->string (current-processor-count)) - n))) - (else "1")))) - (setenv "TESTSUITEFLAGS" - (string-append "-j" ncores))) + (if (%current-target-system) + '() ; no `check' phase when cross-building + '(#:phases (alist-cons-before + 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + ;; Run the test suite in parallel, if possible. + (let ((ncores + (cond + ((getenv "NIX_BUILD_CORES") + => + (lambda (n) + (if (zero? (string->number n)) + (number->string (current-processor-count)) + n))) + (else "1")))) + (setenv "TESTSUITEFLAGS" + (string-append "-j" ncores))) - ;; Path references to /bin/sh. - (let ((bash (assoc-ref inputs "bash"))) - (substitute* "tests/testsuite" - (("/bin/sh") - (string-append bash "/bin/bash"))))) - %standard-phases))))) - (inputs `(("patch/skip-tests" - ,(search-patch "libtool-skip-tests.patch")))) + ;; Path references to /bin/sh. + (let ((bash (assoc-ref inputs "bash"))) + (substitute* "tests/testsuite" + (("/bin/sh") + (string-append bash "/bin/bash"))))) + %standard-phases)))) (synopsis "Generic shared library support tools") (description "Libtool is a script to help in the creation of shared libraries. By diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 8cee8f850b..8a9cee1694 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -130,18 +130,15 @@ is often used for substituting text patterns in a stream.") (define-public tar (package (name "tar") - (version "1.26") + (version "1.27") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/tar/tar-" version ".tar.bz2")) (sha256 (base32 - "0hbdkzmchq9ycr2x1pxqdcgdbaxksh8c6ac0jf75jajhcks6jlss")))) + "0yrwmx2f721ahpnki4fnzvnmrd3md3bq417icb4wrjky7k3caf12")))) (build-system gnu-build-system) - (inputs `(("patch/gets" ,(search-patch "tar-gets-undeclared.patch")))) - (arguments - `(#:patches (list (assoc-ref %build-inputs "patch/gets")))) (synopsis "Managing tar archives") (description "Tar provides the ability to create tar archives, as well as the @@ -212,19 +209,15 @@ interactive means to merge two files.") version ".tar.gz")) (sha256 (base32 - "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3")))) + "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3")) + (patches (list (search-patch "findutils-absolute-paths.patch"))))) (build-system gnu-build-system) - (native-inputs - `(("patch/absolute-paths" - ,(search-patch "findutils-absolute-paths.patch")))) (arguments - `(#:patches (list (assoc-ref %build-inputs "patch/absolute-paths")) - - ;; Work around cross-compilation failure. - ;; See <http://savannah.gnu.org/bugs/?27299#comment1>. - ,@(if (%current-target-system) - '(#:configure-flags '("gl_cv_func_wcwidth_works=yes")) - '()))) + ;; Work around cross-compilation failure. + ;; See <http://savannah.gnu.org/bugs/?27299#comment1>. + (if (%current-target-system) + '(#:configure-flags '("gl_cv_func_wcwidth_works=yes")) + '())) (synopsis "Operating on files matching given criteria") (description "Findutils supplies the basic file directory searching utilities of the @@ -283,21 +276,20 @@ functionality beyond that which is outlined in the POSIX standard.") (define-public gnu-make (package (name "make") - (version "3.82") + (version "4.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/make/make-" version ".tar.bz2")) (sha256 (base32 - "0ri98385hsd7li6rh4l5afcq92v8l2lgiaz85wgcfh4w2wzsghg2")))) + "1nyvn8mknw0mf7727lprva3lisl1y0n03lvar342rrpdmz3qc1p6")) + (patches (list (search-patch "make-impure-dirs.patch"))))) (build-system gnu-build-system) - (native-inputs - `(("patch/impure-dirs" ,(search-patch "make-impure-dirs.patch")))) + (inputs `(("guile" ,guile-2.0))) (outputs '("out" "debug")) (arguments - '(#:patches (list (assoc-ref %build-inputs "patch/impure-dirs")) - #:phases (alist-cons-before + '(#:phases (alist-cons-before 'build 'set-default-shell (lambda* (#:key inputs #:allow-other-keys) ;; Change the default shell from /bin/sh. @@ -328,7 +320,8 @@ change.") version ".tar.bz2")) (sha256 (base32 - "15qhbkz3r266xaa52slh857qn3abw7rb2x2jnhpfrafpzrb4x4gy")))) + "15qhbkz3r266xaa52slh857qn3abw7rb2x2jnhpfrafpzrb4x4gy")) + (patches (list (search-patch "binutils-ld-new-dtags.patch"))))) (build-system gnu-build-system) ;; Split Binutils in several outputs, mostly to avoid collisions in @@ -337,11 +330,8 @@ change.") "lib")) ; libbfd.a, bfd.h, etc. ;; TODO: Add dependency on zlib + those for Gold. - (native-inputs - `(("patch/new-dtags" ,(search-patch "binutils-ld-new-dtags.patch")))) (arguments - `(#:patches (list (assoc-ref %build-inputs "patch/new-dtags")) - #:configure-flags '(;; Add `-static-libgcc' to not retain a dependency + `(#:configure-flags '(;; Add `-static-libgcc' to not retain a dependency ;; on GCC when bootstrapping. "LDFLAGS=-static-libgcc" @@ -372,7 +362,11 @@ archives.") version ".tar.xz")) (sha256 (base32 - "18spla703zav8dq9fw7rbzkyv9qfisxb26p7amg1x3wjh7iy3d1c")))) + "18spla703zav8dq9fw7rbzkyv9qfisxb26p7amg1x3wjh7iy3d1c")) + (patches (map search-patch + '("glibc-no-ld-so-cache.patch" + "glibc-ldd-x86_64.patch" + "glibc-make-4.0.patch"))))) (build-system gnu-build-system) ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc @@ -387,8 +381,6 @@ archives.") (arguments `(#:out-of-source? #t - #:patches (list (assoc-ref %build-inputs "patch/ld.so.cache") - (assoc-ref %build-inputs "patch/ldd")) #:configure-flags (list "--enable-add-ons" "--sysconfdir=/etc" @@ -472,11 +464,7 @@ archives.") (zero? (system* "make" "localedata/install-locales"))) %standard-phases)))) - (inputs `(("patch/ld.so.cache" - ,(search-patch "glibc-no-ld-so-cache.patch")) - ("patch/ldd" - ,(search-patch "glibc-ldd-x86_64.patch")) - ("static-bash" ,(static-package bash-light)))) + (inputs `(("static-bash" ,(static-package bash-light)))) (synopsis "The GNU C Library") (description "Any Unix-like operating system needs a C library: the library which @@ -574,6 +562,10 @@ and daylight-saving rules.") ((#:phases phases) `(alist-replace 'build (lambda _ + ;; Don't attempt to build 'guile.c' since we don't + ;; have Guile here. + (substitute* "build.sh" + (("guile\\.\\$\\{OBJEXT\\}") "")) (zero? (system* "./build.sh"))) (alist-replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -1005,6 +997,14 @@ store.") (current-source-location) #:guile %bootstrap-guile))) +(define-public gnu-make-final + ;; The final GNU Make, which uses the final Guile. + (package-with-bootstrap-guile + (package-with-explicit-inputs gnu-make + `(("guile" ,guile-final) + ,@%boot4-inputs) + (current-source-location)))) + (define-public ld-wrapper ;; The final `ld' wrapper, which uses the final Guile. (package (inherit ld-wrapper-boot3) @@ -1015,9 +1015,13 @@ store.") '("guile" "bash")))))) (define-public %final-inputs - ;; Final derivations used as implicit inputs by `gnu-build-system'. - (let ((finalize (cut package-with-explicit-inputs <> %boot4-inputs - (current-source-location)))) + ;; Final derivations used as implicit inputs by 'gnu-build-system'. We + ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are + ;; used for origins that have patches, thereby avoiding circular + ;; dependencies. + (let ((finalize (compose package-with-bootstrap-guile + (cut package-with-explicit-inputs <> %boot4-inputs + (current-source-location))))) `(,@(map (match-lambda ((name package) (list name (finalize package)))) @@ -1031,8 +1035,8 @@ store.") ("sed" ,sed) ("grep" ,grep) ("findutils" ,findutils) - ("gawk" ,gawk) - ("make" ,gnu-make))) + ("gawk" ,gawk))) + ("make" ,gnu-make-final) ("bash" ,bash-final) ("ld-wrapper" ,ld-wrapper) ("binutils" ,binutils-final) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 11f54ad051..2a8af36ad6 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -64,11 +64,21 @@ #:guile %bootstrap-guile #:system system))) + (define %bootstrap-patch-inputs + ;; Packages used when an <origin> has a non-empty 'patches' field. + `(("tar" ,%bootstrap-coreutils&co) + ("xz" ,%bootstrap-coreutils&co) + ("bzip2" ,%bootstrap-coreutils&co) + ("gzip" ,%bootstrap-coreutils&co) + ("patch" ,%bootstrap-coreutils&co))) + (let ((orig-method (origin-method source))) (origin (inherit source) (method (cond ((eq? orig-method url-fetch) (boot url-fetch)) - (else orig-method)))))) + (else orig-method))) + (patch-guile %bootstrap-guile) + (patch-inputs %bootstrap-patch-inputs)))) (define (package-from-tarball name source program-to-test description) "Return a package that correspond to the extraction of SOURCE. diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm index f341b246a2..6bfe564148 100644 --- a/gnu/packages/m4.scm +++ b/gnu/packages/m4.scm @@ -33,7 +33,8 @@ version ".tar.bz2")) (sha256 (base32 - "0w0da1chh12mczxa5lnwzjk9czi3dq6gnnndbpa6w4rj76b1yklf")))) + "0w0da1chh12mczxa5lnwzjk9czi3dq6gnnndbpa6w4rj76b1yklf")) + (patches (list (search-patch "m4-readlink-EINVAL.patch"))))) (build-system gnu-build-system) (arguments ;; XXX: Disable tests on those platforms with know issues. @@ -41,8 +42,6 @@ '("x86_64-darwin" "i686-cygwin" "i686-sunos"))) - #:patches (list (assoc-ref %build-inputs - "patch/readlink-EINVAL")) #:phases (alist-cons-before 'check 'pre-check (lambda* (#:key inputs #:allow-other-keys) @@ -55,8 +54,6 @@ (("/bin/sh") (format #f "~a/bin/bash" bash))))) %standard-phases))) - (inputs `(("patch/readlink-EINVAL" - ,(search-patch "m4-readlink-EINVAL.patch")))) (synopsis "Macro processor") (description "GNU M4 is an implementation of the M4 macro language, which features diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index 6692d26b59..c9e691a626 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -27,7 +27,7 @@ (define-public gmp (package (name "gmp") - (version "5.1.2") + (version "5.1.3") (source (origin (method url-fetch) (uri @@ -35,7 +35,7 @@ version ".tar.xz")) (sha256 (base32 - "1hnbxz7a6jrli8ph27i8zb6k2f456zn6l5xi78yhskzbxjk47nf7")))) + "0wbhn3wih61vjcs94q531fipfvvzqfq2v4qr03rl3xaggyiyvqny")))) (build-system gnu-build-system) (native-inputs `(("m4" ,m4))) (outputs '("out" "debug")) diff --git a/gnu/packages/patches/glibc-make-4.0.patch b/gnu/packages/patches/glibc-make-4.0.patch new file mode 100644 index 0000000000..d83de1d33d --- /dev/null +++ b/gnu/packages/patches/glibc-make-4.0.patch @@ -0,0 +1,12 @@ +Allow libc to be compiled with GNU Make 4.0. + +--- glibc-2.18/configure 2013-08-11 00:52:55.000000000 +0200 ++++ glibc-2.18/configure 2013-10-16 16:53:09.000000000 +0200 +@@ -4772,7 +4772,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | 4.*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; diff --git a/gnu/packages/patches/tar-gets-undeclared.patch b/gnu/packages/patches/tar-gets-undeclared.patch deleted file mode 100644 index 301a09dde1..0000000000 --- a/gnu/packages/patches/tar-gets-undeclared.patch +++ /dev/null @@ -1,26 +0,0 @@ -This patch is needed to allow builds with newer versions of -the GNU libc (2.16+). - -This is a backport of this patch: - -commit 66712c23388e93e5c518ebc8515140fa0c807348 -Author: Eric Blake <eblake@redhat.com> -Date: Thu Mar 29 13:30:41 2012 -0600 - - stdio: don't assume gets any more - ---- tar-1.26/gnu/stdio.in.h 2012-07-02 14:28:45.000000000 +0200 -+++ tar-1.26/gnu/stdio.in.h 2012-07-02 14:28:50.000000000 +0200 -@@ -160,12 +160,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not - "use gnulib module fflush for portable POSIX compliance"); - #endif - --/* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning. Assume it is -- always declared, since it is required by C89. */ --#undef gets --_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -- - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index c677a1b7e2..21cdc5cea7 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -34,11 +34,11 @@ version ".tar.gz")) (sha256 (base32 - "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km")))) + "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km")) + (patches (list (search-patch "perl-no-sys-dirs.patch"))))) (build-system gnu-build-system) (arguments '(#:tests? #f - #:patches (list (assoc-ref %build-inputs "patch/no-sys-dirs")) #:phases (alist-replace 'configure @@ -62,7 +62,6 @@ (string-append "-Dlocincpth=" libc "/include") (string-append "-Dloclibpth=" libc "/lib"))))) %standard-phases))) - (inputs `(("patch/no-sys-dirs" ,(search-patch "perl-no-sys-dirs.patch")))) (native-search-paths (list (search-path-specification (variable "PERL5LIB") (directories '("lib/perl5/site_perl"))))) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index 1fbbd69d7e..5e8d7d7003 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -45,15 +45,12 @@ version ".tar.gz")) (sha256 (base32 - "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr")))) + "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr")) + (patches (list (search-patch "readline-link-ncurses.patch"))) + (patch-flags '("-p0")))) (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) - (inputs `(("patch/link-ncurses" - ,(search-patch "readline-link-ncurses.patch")))) - (arguments `(#:patches (list (assoc-ref %build-inputs - "patch/link-ncurses")) - #:patch-flags '("-p0") - #:configure-flags + (arguments `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath -Wl," (assoc-ref %build-inputs "ncurses") "/lib")) diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 38f11cb3c3..e09f165b97 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -47,7 +47,6 @@ (outputs '("out")) (configure-flags ''()) (search-paths '()) (make-flags ''()) - (patches ''()) (patch-flags ''("--batch" "-p1")) (cmake (default-cmake)) (out-of-source? #f) (tests? #t) @@ -80,8 +79,6 @@ provides a 'CMakeLists.txt' file as its build system." #:search-paths ',(map search-path-specification->sexp (append search-paths (standard-search-paths))) - #:patches ,patches - #:patch-flags ,patch-flags #:phases ,phases #:configure-flags ,configure-flags #:make-flags ,make-flags diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 5f13f8ee29..7725b8b67a 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -252,7 +252,6 @@ System: GCC, GNU Make, Bash, Coreutils, etc." (search-paths '()) (configure-flags ''()) (make-flags ''()) - (patches ''()) (patch-flags ''("--batch" "-p1")) (out-of-source? #f) (tests? #t) (test-target "check") @@ -300,8 +299,6 @@ which could lead to gratuitous input divergence." #:search-paths ',(map search-path-specification->sexp (append implicit-search-paths search-paths)) - #:patches ,patches - #:patch-flags ,patch-flags #:phases ,phases #:configure-flags ,configure-flags #:make-flags ,make-flags @@ -390,7 +387,6 @@ inputs." (configure-flags ''()) (make-flags ''()) - (patches ''()) (patch-flags ''("--batch" "-p1")) (out-of-source? #f) (tests? #f) ; nothing can be done (test-target "check") @@ -473,8 +469,6 @@ platform." search-path-specification->sexp (append implicit-host-search-paths native-search-paths)) - #:patches ,patches - #:patch-flags ,patch-flags #:phases ,phases #:configure-flags ,configure-flags #:make-flags ,make-flags diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index cf7ca7d3e1..32b1f36a94 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -58,9 +58,8 @@ prepended to the name." (let* ((build-system (package-build-system p)) (rewrite-if-package (lambda (content) - ;; CONTENT may be a string (e.g., for patches), in which case it - ;; is returned, or a package, which is rewritten with the new - ;; PYTHON and NEW-PREFIX. + ;; CONTENT may be a file name, in which case it is returned, or a + ;; package, which is rewritten with the new PYTHON and NEW-PREFIX. (if (package? content) (package-with-explicit-python content python old-prefix new-prefix) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index ebcb185e13..65c9fcd1bd 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -115,14 +115,6 @@ makefiles." ;; Patch `SHELL' in generated makefiles. (for-each patch-makefile-SHELL (find-files "." "^(GNU)?[mM]akefile$"))) -(define* (patch #:key (patches '()) (patch-flags '("--batch" "-p1")) - #:allow-other-keys) - (every (lambda (p) - (format #t "applying patch `~a'~%" p) - (zero? (apply system* "patch" - (append patch-flags (list "--input" p))))) - patches)) - (define* (configure #:key target native-inputs inputs outputs (configure-flags '()) out-of-source? #:allow-other-keys) @@ -344,7 +336,7 @@ makefiles." ;; Standard build phases, as a list of symbol/procedure pairs. (let-syntax ((phases (syntax-rules () ((_ p ...) `((p . ,p) ...))))) - (phases set-paths unpack patch + (phases set-paths unpack patch-source-shebangs configure patch-generated-file-shebangs build check install patch-shebangs strip))) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 8cc9c1ee1f..a37ace31af 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -207,7 +207,7 @@ matches REGEXP." (lambda (file stat errno result) (format (current-error-port) "find-files: ~a: ~a~%" file (strerror errno)) - #f) + result) '() dir) string<?)) diff --git a/guix/packages.scm b/guix/packages.scm index 44f683f776..157013a496 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -109,9 +109,12 @@ (patches origin-patches (default '())) ; list of file names (patch-flags origin-patch-flags ; list of strings (default '("-p1"))) + + ;; Patching requires Guile, GNU Patch, and a few more. These two fields are + ;; used to specify these dependencies when needed. (patch-inputs origin-patch-inputs ; input list or #f (default #f)) - (patch-guile origin-patch-guile ; derivation or #f + (patch-guile origin-patch-guile ; package or #f (default #f))) (define-syntax base32 @@ -264,11 +267,10 @@ corresponds to the arguments expected by `set-path-environment-variable'." ("lzip" ,(ref '(gnu packages compression) 'lzip)) ("patch" ,(ref '(gnu packages base) 'patch))))) -(define (default-guile store system) - "Return a derivation of d the default Guile package for SYSTEM." - (let* ((distro (resolve-interface '(gnu packages base))) - (guile (module-ref distro 'guile-final))) - (package-derivation store guile system))) +(define (default-guile) + "Return the default Guile package for SYSTEM." + (let ((distro (resolve-interface '(gnu packages base)))) + (module-ref distro 'guile-final))) (define* (patch-and-repack store source patches inputs #:key @@ -363,13 +365,17 @@ using the tools listed in INPUTS." inputs guile-for-build) ;; One or more patches. (let ((source (method store uri 'sha256 sha256 name - #:system system))) + #:system system)) + (guile (match (or guile-for-build (%guile-for-build) + (default-guile)) + ((? package? p) + (package-derivation store p system)) + ((? derivation? drv) + drv)))) (patch-and-repack store source patches inputs #:flags flags #:system system - #:guile-for-build (or guile-for-build - (%guile-for-build) - (default-guile store system))))) + #:guile-for-build guile))) ((and (? string?) (? store-path?) file) file) ((? string? file) |