diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyudev')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyudev/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyudev/default.nix b/nixpkgs/pkgs/development/python-modules/pyudev/default.nix new file mode 100644 index 000000000000..fa5c371b9b1a --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyudev/default.nix @@ -0,0 +1,35 @@ +{ lib, fetchPypi, buildPythonPackage +, six, systemd, pytest, mock, hypothesis, docutils +}: + +buildPythonPackage rec { + pname = "pyudev"; + version = "0.21.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0arz0dqp75sszsmgm6vhg92n1lsx91ihddx3m944f4ah0487ljq9"; + }; + + postPatch = '' + substituteInPlace src/pyudev/_ctypeslib/utils.py \ + --replace "find_library(name)" "'${systemd.lib}/lib/libudev.so'" + ''; + + checkInputs = [ 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; + }; +} |