Skip to content
Snippets Groups Projects
Unverified Commit 67a3b2dd authored by Ricardo Wurmus's avatar Ricardo Wurmus
Browse files

gnu: python-pyusb: Prettify library substitution.

* gnu/packages/libusb.scm (python-pyusb)[arguments]: Use srfi-1 to make
the "fix-libusb-reference" phase clearer.
parent bae67829
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,8 @@ (define-public python-pyusb
(build-system python-build-system)
(arguments
`(#:tests? #f ;no tests
#:modules ((srfi srfi-26)
#:modules ((srfi srfi-1)
(srfi srfi-26)
(guix build utils)
(guix build python-build-system))
#:phases
......@@ -116,11 +117,9 @@ (define-public python-pyusb
(("lib = locate_library\\(candidates, find_library\\)")
(string-append
"lib = \""
(car (find-files (assoc-ref inputs "libusb")
(lambda (file stat)
(and ((file-name-predicate
"^libusb-.*\\.so\\..*") file stat)
(not (symbolic-link? file))))))
(find (negate symbolic-link?)
(find-files (assoc-ref inputs "libusb")
"^libusb-.*\\.so\\..*"))
"\"")))
#t)))))
(inputs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment