blob: c7d1d1f3b5a224deee2c2f22c494f90010ea3fa8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{
lib,
fetchPypi,
buildPythonPackage,
six,
udev,
pytest,
mock,
hypothesis,
docutils,
stdenvNoCC,
}:
buildPythonPackage rec {
pname = "pyudev";
version = "0.24.3";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-LpRUJ6IWdIk7uXYyQB22ITnZHOoe6WE3zHsHrSIZj8c=";
};
postPatch = lib.optionalString stdenvNoCC.hostPlatform.isLinux ''
substituteInPlace src/pyudev/_ctypeslib/utils.py \
--replace "find_library(name)" "'${lib.getLib udev}/lib/libudev.so'"
'';
nativeCheckInputs = [
pytest
mock
hypothesis
docutils
];
propagatedBuildInputs = [ six ];
checkPhase = ''
py.test
'';
# Bunch of failing tests
# https://github.com/pyudev/pyudev/issues/187
doCheck = false;
meta = {
homepage = "https://pyudev.readthedocs.org/";
description = "Pure Python libudev binding";
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ frogamic ];
};
}
|