at 23.05-pre 760 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, hidapi 5, nose 6}: 7 8buildPythonPackage rec { 9 pname = "hid"; 10 version = "1.0.5"; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "sha256-HpVOf3q5t8nfx421lQRpLBfbO3EklJK5drFSW5fbsOg="; 15 }; 16 17 propagatedBuildInputs = [ hidapi ]; 18 19 checkInputs = [ nose ]; 20 21 postPatch = '' 22 hidapi=${hidapi}/lib/ 23 test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } 24 sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py 25 ''; 26 27 meta = with lib; { 28 description = "hidapi bindings in ctypes"; 29 homepage = "https://github.com/apmorton/pyhidapi"; 30 license = with licenses; [ mit ]; 31 maintainers = with maintainers; [ AndersonTorres ]; 32 }; 33}