summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/build/gnu-build-system.scm31
-rw-r--r--guix/build/utils.scm4
-rw-r--r--guix/packages.scm7
-rw-r--r--guix/profiles.scm21
4 files changed, 33 insertions, 30 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 34edff7f40..ab97c92a2b 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -386,26 +386,17 @@ makefiles."
(when debug-output
(format #t "debugging output written to ~s using ~s~%"
debug-output objcopy-command))
- (file-system-fold (const #t)
- (lambda (path stat result) ; leaf
- (and (file-exists? path) ;discard dangling symlinks
- (or (elf-file? path) (ar-file? path))
- (or (not debug-output)
- (make-debug-file path))
- (zero? (apply system* strip-command
- (append strip-flags (list path))))
- (or (not debug-output)
- (add-debug-link path))))
- (const #t) ; down
- (const #t) ; up
- (const #t) ; skip
- (lambda (path stat errno result)
- (format (current-error-port)
- "strip: failed to access `~a': ~a~%"
- path (strerror errno))
- #f)
- #t
- dir))
+
+ (for-each (lambda (file)
+ (and (file-exists? file) ;discard dangling symlinks
+ (or (elf-file? file) (ar-file? file))
+ (or (not debug-output)
+ (make-debug-file file))
+ (zero? (apply system* strip-command
+ (append strip-flags (list file))))
+ (or (not debug-output)
+ (add-debug-link file))))
+ (find-files dir)))
(or (not strip-binaries?)
(every strip-dir
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 2988193fce..6e706b378e 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -518,8 +518,8 @@ following forms:
(add-before <old-phase-name> <new-phase-name> <new-phase>)
(add-after <old-phase-name> <new-phase-name> <new-phase>)
-Where every <*-phase-name> is an automatically quoted symbol, and <new-phase>
-an expression evaluating to a procedure."
+Where every <*-phase-name> is an expression evaluating to a symbol, and
+<new-phase> an expression evaluating to a procedure."
(let* ((phases* phases)
(phases* (%modify-phases phases* mod-spec))
...)
diff --git a/guix/packages.scm b/guix/packages.scm
index d544c34cf8..52204b1e09 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -479,9 +480,11 @@ specifies modules in scope when evaluating SNIPPET."
(format (current-error-port) "applying '~a'...~%" patch)
;; Use '--force' so that patches that do not apply perfectly are
- ;; rejected.
+ ;; rejected. Use '--no-backup-if-mismatch' to prevent making
+ ;; "*.orig" file if a patch is applied with offset.
(zero? (system* (string-append #+patch "/bin/patch")
- "--force" #+@flags "--input" patch)))
+ "--force" "--no-backup-if-mismatch"
+ #+@flags "--input" patch)))
(define (first-file directory)
;; Return the name of the first file in DIRECTORY.
diff --git a/guix/profiles.scm b/guix/profiles.scm
index cd448e3f25..169c700f19 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -642,7 +642,18 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx."
(define (gtk-icon-themes manifest)
"Return a derivation that unions all icon themes from manifest entries and
creates the GTK+ 'icon-theme.cache' file for each theme."
- (mlet %store-monad ((gtk+ (manifest-lookup-package manifest "gtk+")))
+ (define gtk+ ; lazy reference
+ (module-ref (resolve-interface '(gnu packages gtk)) 'gtk+))
+
+ (mlet %store-monad ((%gtk+ (manifest-lookup-package manifest "gtk+"))
+ ;; XXX: Can't use gtk-update-icon-cache corresponding
+ ;; to the gtk+ referenced by 'manifest'. Because
+ ;; '%gtk+' can be either a package or store path, and
+ ;; there's no way to get the "bin" output for the later.
+ (gtk-update-icon-cache
+ -> #~(string-append #+gtk+:bin
+ "/bin/gtk-update-icon-cache")))
+
(define build
(with-imported-modules '((guix build utils)
(guix build union)
@@ -659,9 +670,7 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
(let* ((destdir (string-append #$output "/share/icons"))
(icondirs (filter file-exists?
(map (cut string-append <> "/share/icons")
- '#$(manifest-inputs manifest))))
- (update-icon-cache (string-append
- #+gtk+ "/bin/gtk-update-icon-cache")))
+ '#$(manifest-inputs manifest)))))
;; Union all the icons.
(mkdir-p (string-append #$output "/share"))
@@ -676,11 +685,11 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
;; "abiword_48.png". Ignore these.
(when (file-is-directory? dir)
(ensure-writable-directory dir)
- (system* update-icon-cache "-t" dir "--quiet"))))
+ (system* #+gtk-update-icon-cache "-t" dir "--quiet"))))
(scandir destdir (negate (cut member <> '("." "..")))))))))
;; Don't run the hook when there's nothing to do.
- (if gtk+
+ (if %gtk+
(gexp->derivation "gtk-icon-themes" build
#:local-build? #t
#:substitutable? #f)