mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
078412521e
- the function loading the udev library was moved to another file - the test runner did not work correctly, causing it to fail on Python 3. - the test runner now works correctly, but there's a bunch of tests failing and therefore tests are disabled. The package does seem to function (as in, it can load the library again).
36 lines
850 B
Nix
36 lines
850 B
Nix
{ lib, fetchurl, buildPythonPackage
|
|
, six, systemd, pytest, mock, hypothesis, docutils
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
name = "pyudev-${version}";
|
|
version = "0.21.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://pypi/p/pyudev/${name}.tar.gz";
|
|
sha256 = "0arz0dqp75sszsmgm6vhg92n1lsx91ihddx3m944f4ah0487ljq9";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/pyudev/_ctypeslib/utils.py \
|
|
--replace "find_library(name)" "'${systemd.lib}/lib/libudev.so'"
|
|
'';
|
|
|
|
buildInputs = [ pytest mock hypothesis docutils ];
|
|
propagatedBuildInputs = [ systemd six ];
|
|
|
|
checkPhase = ''
|
|
py.test
|
|
'';
|
|
|
|
# Bunch of failing tests
|
|
# https://github.com/pyudev/pyudev/issues/187
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
homepage = "http://pyudev.readthedocs.org/";
|
|
description = "Pure Python libudev binding";
|
|
license = lib.licenses.lgpl21Plus;
|
|
};
|
|
}
|