diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-11-23 22:30:10 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-11-23 22:30:10 +0100 |
commit | 53c85e97dcc264da5ff5cd4e3be4d47028f4d726 (patch) | |
tree | 8984fefeb61e0c165bf960fdfa3cd11355d02ba3 /guix | |
parent | 2e838890ff989128e8a78eea574d1ad158dd6361 (diff) | |
parent | c320011da5e743f47220f380c818e95394f6d9c0 (diff) |
Merge branch 'core-updates'
Conflicts:
gnu/packages/gnunet.scm
Diffstat (limited to 'guix')
-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 |
6 files changed, 20 insertions, 32 deletions
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 c5a2e86316..a97135fe0c 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 bb7d873973..c1247b71ac 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -113,13 +113,16 @@ (snippet origin-snippet (default #f)) ; sexp or #f (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)) (modules origin-modules ; list of module names (default '())) (imported-modules origin-imported-modules ; list of module names (default '())) - (patch-guile origin-patch-guile ; derivation or #f + (patch-guile origin-patch-guile ; package or #f (default #f))) (define-syntax base32 @@ -274,11 +277,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 #:key @@ -404,7 +406,13 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." guile-for-build) ;; Patches and/or a snippet. (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 inputs #:snippet snippet @@ -412,9 +420,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." #:system system #:modules modules #:imported-modules modules - #:guile-for-build (or guile-for-build - (%guile-for-build) - (default-guile store system))))) + #:guile-for-build guile))) ((and (? string?) (? direct-store-path?) file) file) ((? string? file) |