2018-06-23 15:27:58 +02:00
|
|
|
{ lib, fetchPypi, buildPythonPackage
|
2017-03-29 08:33:32 +02:00
|
|
|
, six, systemd, pytest, mock, hypothesis, docutils
|
2017-03-09 13:40:56 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "pyudev";
|
2017-03-09 13:40:56 +01:00
|
|
|
version = "0.21.0";
|
|
|
|
|
2018-06-23 15:27:58 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-03-09 13:40:56 +01:00
|
|
|
sha256 = "0arz0dqp75sszsmgm6vhg92n1lsx91ihddx3m944f4ah0487ljq9";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2017-03-29 08:33:32 +02:00
|
|
|
substituteInPlace src/pyudev/_ctypeslib/utils.py \
|
|
|
|
--replace "find_library(name)" "'${systemd.lib}/lib/libudev.so'"
|
2017-03-09 13:40:56 +01:00
|
|
|
'';
|
|
|
|
|
2019-01-05 11:54:27 +01:00
|
|
|
checkInputs = [ pytest mock hypothesis docutils ];
|
2017-03-09 13:40:56 +01:00
|
|
|
propagatedBuildInputs = [ systemd six ];
|
|
|
|
|
2017-03-29 08:33:32 +02:00
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Bunch of failing tests
|
|
|
|
# https://github.com/pyudev/pyudev/issues/187
|
|
|
|
doCheck = false;
|
|
|
|
|
2017-03-09 13:40:56 +01:00
|
|
|
meta = {
|
2019-04-22 10:24:21 +02:00
|
|
|
homepage = https://pyudev.readthedocs.org/;
|
2017-03-09 13:40:56 +01:00
|
|
|
description = "Pure Python libudev binding";
|
|
|
|
license = lib.licenses.lgpl21Plus;
|
|
|
|
};
|
|
|
|
}
|