aboutsummaryrefslogtreecommitdiff
path: root/distro/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-10-18 21:43:35 +0200
committerLudovic Courtès <ludo@gnu.org>2012-10-18 21:43:35 +0200
commite3dadc6818db307abe581fb73daa5dafb3219393 (patch)
treed34df86a9091da7a5971634feb28199fc1bd1490 /distro/packages
parent207ad6b2e9748147f608bd29843cd0cf0d904646 (diff)
downloadguix-e3dadc6818db307abe581fb73daa5dafb3219393.tar.gz
guix-e3dadc6818db307abe581fb73daa5dafb3219393.zip
distro: bzip2: Simplify installation phase with `find-files'.
* distro/packages/base.scm (bzip2): Use `find-files' instead of rolling our own with `file-system-fold'.
Diffstat (limited to 'distro/packages')
-rw-r--r--distro/packages/base.scm47
1 files changed, 18 insertions, 29 deletions
diff --git a/distro/packages/base.scm b/distro/packages/base.scm
index 69140cc2e8..318af1c4ab 100644
--- a/distro/packages/base.scm
+++ b/distro/packages/base.scm
@@ -282,23 +282,13 @@ superior compression ratio of gzip is just a bonus.")
'(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(libdir (string-append out "/lib")))
- ;; XXX: mv libbz2.so* $libdir
- (file-system-fold (const #t)
- (lambda (path stat result) ; leaf
- (define base (basename path))
- (when (string-prefix? "libbz2.so" base)
- (format #t "installing `~a' to `~a'~%"
- base libdir)
- (copy-file path
- (string-append libdir "/"
- base))))
- (const #t) ; down
- (const #t) ; up
- (const #t) ; skip
- (lambda (path stat errno result)
- (error "i/o error" path (strerror errno)))
- #t
- ".")))))
+ (for-each (lambda (file)
+ (let ((base (basename file)))
+ (format #t "installing `~a' to `~a'~%"
+ base libdir)
+ (copy-file file
+ (string-append libdir "/" base))))
+ (find-files "." "^libbz2\\.so"))))))
(package
(name "bzip2")
(version "1.0.6")
@@ -313,18 +303,17 @@ superior compression ratio of gzip is just a bonus.")
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
- (srfi srfi-1)
- (ice-9 ftw))
- #:phases
- (alist-cons-before
- 'build 'build-shared-lib ,build-shared-lib
- (alist-cons-after
- 'install 'fix-man-dir ,fix-man-dir
- (alist-cons-after
- 'install 'install-shared-lib ,install-shared-lib
- (alist-delete 'configure %standard-phases))))
- #:make-flags (list (string-append "PREFIX="
- (assoc-ref %outputs "out")))))
+ (srfi srfi-1))
+ #:phases
+ (alist-cons-before
+ 'build 'build-shared-lib ,build-shared-lib
+ (alist-cons-after
+ 'install 'fix-man-dir ,fix-man-dir
+ (alist-cons-after
+ 'install 'install-shared-lib ,install-shared-lib
+ (alist-delete 'configure %standard-phases))))
+ #:make-flags (list (string-append "PREFIX="
+ (assoc-ref %outputs "out")))))
(description "high-quality data compression program")
(long-description
"bzip2 is a freely available, patent free (see below), high-quality data