pythonPackages.pyusb: move to python-modules/
This commit is contained in:
parent
086ad07ed6
commit
aaa3608b4b
30
pkgs/development/python-modules/pyusb/default.nix
Normal file
30
pkgs/development/python-modules/pyusb/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, fetchurl, buildPythonPackage, libusb, libusb1 }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "pyusb-1.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pypi.python.org/packages/8a/19/66fb48a4905e472f5dfeda3a1bafac369fbf6d6fc5cf55b780864962652d/PyUSB-1.0.0.tar.gz";
|
||||
sha256 = "0s2k4z06fapd5vp1gnrlf8a9sjpc03p9974lzw5k6ky39akzyd2v";
|
||||
};
|
||||
|
||||
# Fix the USB backend library lookup
|
||||
postPatch =
|
||||
''
|
||||
libusb=${libusb1.out}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
|
||||
sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ libusb ];
|
||||
|
||||
# No tests included
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python USB access module (wraps libusb 1.0)"; # can use other backends
|
||||
homepage = http://pyusb.sourceforge.net/;
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
};
|
||||
}
|
@ -22812,35 +22812,7 @@ EOF
|
||||
|
||||
unidecode = callPackage ../development/python-modules/unidecode {};
|
||||
|
||||
pyusb = buildPythonPackage rec {
|
||||
name = "pyusb-1.0.0";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/8a/19/66fb48a4905e472f5dfeda3a1bafac369fbf6d6fc5cf55b780864962652d/PyUSB-1.0.0.tar.gz";
|
||||
sha256 = "0s2k4z06fapd5vp1gnrlf8a9sjpc03p9974lzw5k6ky39akzyd2v";
|
||||
};
|
||||
|
||||
# Fix the USB backend library lookup
|
||||
postPatch =
|
||||
''
|
||||
libusb=${pkgs.libusb1.out}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
|
||||
sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pkgs.libusb ];
|
||||
|
||||
# No tests included
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Python USB access module (wraps libusb 1.0)"; # can use other backends
|
||||
homepage = http://pyusb.sourceforge.net/;
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
};
|
||||
};
|
||||
|
||||
pyusb = callPackage ../development/python-modules/pyusb {};
|
||||
|
||||
BlinkStick = buildPythonPackage rec {
|
||||
name = "BlinkStick-${version}";
|
||||
|
Loading…
Reference in New Issue
Block a user