all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Eric Bavier <ericbavier@openmailbox.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] Add pyusb.
Date: Wed, 30 Mar 2016 08:07:39 +0200	[thread overview]
Message-ID: <87io04o5w4.fsf@elephly.net> (raw)
In-Reply-To: <20160329212748.7741d2be@openmailbox.org>


Eric Bavier <ericbavier@openmailbox.org> writes:

> On Tue, 29 Mar 2016 09:07:44 +0200
> Ricardo Wurmus <rekado@elephly.net> wrote:
>
>> From a5a632c0f11d650a8e3bcae64ea8680aa90d3cf6 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado@elephly.net>
>> Date: Tue, 29 Mar 2016 09:06:09 +0200
>> Subject: [PATCH] gnu: Add python-pyusb.
>> 
>> * gnu/packages/libusb.scm (python-pyusb, python2-pyusb): New variables.
>> ---
>>  gnu/packages/libusb.scm | 40 +++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 39 insertions(+), 1 deletion(-)
>> 
> [...]
>> @@ -87,6 +89,42 @@ devices on various operating systems.")
>>  version of libusb to run with newer libusb.")
>>      (license lgpl2.1+)))
>>  
>> +(define-public python-pyusb
>> +  (package
>> +    (name "python-pyusb")
>> +    (version "1.0.0rc1")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (pypi-uri "pyusb" version))
>> +       (sha256
>> +        (base32
>> +         "07cjq11qhngzjd746k7688s6y2x7lpj669fxqfsiy985rg0jsn7j"))))
>> +    (build-system python-build-system)
>> +    (arguments
>> +     `(#:tests? #f  ;no tests
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'fix-libusb-reference
>> +           (lambda* (#:key inputs #:allow-other-keys)
>> +             (substitute* "usb/libloader.py"
>> +               (("lib = locate_library\\(candidates, find_library\\)")
>> +                (string-append "lib = \""
>> +                               (assoc-ref inputs "libusb")
>> +                               "/lib/libusb-1.0.so.0.1.0"
>
> Is there any way to derive the soversion to help avoid breakage from
> future libusb updates?

I don’t know where the name comes from.  I could certainly just look in
the “lib” directory of the “libusb” input and take the first
“libusb*.so.*” file that’s not a symlink.

~~ Ricardo

  reply	other threads:[~2016-03-30  6:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29  7:07 [PATCH] Add pyusb Ricardo Wurmus
2016-03-30  2:27 ` Eric Bavier
2016-03-30  6:07   ` Ricardo Wurmus [this message]
2016-03-30  6:47   ` Ricardo Wurmus
2016-04-07 20:49     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87io04o5w4.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=ericbavier@openmailbox.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.