mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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'.
This commit is contained in:
parent
207ad6b2e9
commit
e3dadc6818
1 changed files with 18 additions and 29 deletions
|
|
@ -282,23 +282,13 @@ superior compression ratio of gzip is just a bonus.")
|
||||||
'(lambda* (#:key outputs #:allow-other-keys)
|
'(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(libdir (string-append out "/lib")))
|
(libdir (string-append out "/lib")))
|
||||||
;; XXX: mv libbz2.so* $libdir
|
(for-each (lambda (file)
|
||||||
(file-system-fold (const #t)
|
(let ((base (basename file)))
|
||||||
(lambda (path stat result) ; leaf
|
|
||||||
(define base (basename path))
|
|
||||||
(when (string-prefix? "libbz2.so" base)
|
|
||||||
(format #t "installing `~a' to `~a'~%"
|
(format #t "installing `~a' to `~a'~%"
|
||||||
base libdir)
|
base libdir)
|
||||||
(copy-file path
|
(copy-file file
|
||||||
(string-append libdir "/"
|
(string-append libdir "/" base))))
|
||||||
base))))
|
(find-files "." "^libbz2\\.so"))))))
|
||||||
(const #t) ; down
|
|
||||||
(const #t) ; up
|
|
||||||
(const #t) ; skip
|
|
||||||
(lambda (path stat errno result)
|
|
||||||
(error "i/o error" path (strerror errno)))
|
|
||||||
#t
|
|
||||||
".")))))
|
|
||||||
(package
|
(package
|
||||||
(name "bzip2")
|
(name "bzip2")
|
||||||
(version "1.0.6")
|
(version "1.0.6")
|
||||||
|
|
@ -313,8 +303,7 @@ superior compression ratio of gzip is just a bonus.")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build gnu-build-system)
|
`(#:modules ((guix build gnu-build-system)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(srfi srfi-1)
|
(srfi srfi-1))
|
||||||
(ice-9 ftw))
|
|
||||||
#:phases
|
#:phases
|
||||||
(alist-cons-before
|
(alist-cons-before
|
||||||
'build 'build-shared-lib ,build-shared-lib
|
'build 'build-shared-lib ,build-shared-lib
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue