gnu: Use the 'patches' field of <origin>.

* gnu/packages/autotools.scm (libtool): Add 'patches' field to the
  origin.  Remove 'inputs' field.
* gnu/packages/base.scm (findutils, gnu-make, binutils, glibc):
  Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/perl.scm (perl): Likewise.
* gnu/packages/readline.scm (readline): Likewise.
This commit is contained in:
Ludovic Courtès 2013-10-10 23:05:28 +02:00
parent 5fbeb4e6e1
commit de80b5045b
5 changed files with 51 additions and 71 deletions

View File

@ -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

View File

@ -209,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
@ -287,14 +283,12 @@ functionality beyond that which is outlined in the POSIX standard.")
".tar.bz2"))
(sha256
(base32
"0ri98385hsd7li6rh4l5afcq92v8l2lgiaz85wgcfh4w2wzsghg2"))))
"0ri98385hsd7li6rh4l5afcq92v8l2lgiaz85wgcfh4w2wzsghg2"))
(patches (list (search-patch "make-impure-dirs.patch")))))
(build-system gnu-build-system)
(native-inputs
`(("patch/impure-dirs" ,(search-patch "make-impure-dirs.patch"))))
(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.
@ -325,7 +319,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
@ -334,11 +329,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"
@ -369,7 +361,10 @@ archives.")
version ".tar.xz"))
(sha256
(base32
"18spla703zav8dq9fw7rbzkyv9qfisxb26p7amg1x3wjh7iy3d1c"))))
"18spla703zav8dq9fw7rbzkyv9qfisxb26p7amg1x3wjh7iy3d1c"))
(patches (map search-patch
'("glibc-no-ld-so-cache.patch"
"glibc-ldd-x86_64.patch")))))
(build-system gnu-build-system)
;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc
@ -384,8 +379,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"
@ -469,11 +462,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

View File

@ -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

View File

@ -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")))))

View File

@ -45,15 +45,12 @@
version ".tar.gz"))
(sha256
(base32
"10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr"))))
"10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr"))
(patches (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"))