diff options
author | Philip Potter <philip.g.potter@gmail.com> | 2016-08-11 14:41:55 +0100 |
---|---|---|
committer | Philip Potter <philip.g.potter@gmail.com> | 2016-08-11 14:41:55 +0100 |
commit | d671dbe2ad78004d8f0d4c4b40aa5612a2f417f4 (patch) | |
tree | c3cce97ecd88e68dff332eadf373e2e50378a039 | |
parent | 05a81335cf08e2b494cb56e1f7471e5b45b13893 (diff) |
pyusb: fix hardcoding libusb1 path
The line that was being replaced by the `sed` command has disappeared from the source file. The new `sed` script will replace the default find_library function as a parameter to the get_backend and _load_library functions. This means that if a user wants to provide their own find_library implementation, their chosen implementation will still be used.
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a96c420fe150b..c889db26bc544 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -25940,7 +25940,7 @@ in modules // { postPatch = '' libusb=${pkgs.libusb1.out}/lib/libusb-1.0.so test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } - sed -i -e "s|libname = .*|libname = \"$libusb\"|" usb/backend/libusb1.py + sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py ''; # No tests included |