nixpkgs/pkgs/development/python-modules/pyudev/default.nix
Frederik Rietdijk ced21f5e1a pythonPackages: remove name attribute`
The `buildPython*` function computes name from `pname` and `version`.
This change removes `name` attribute from all expressions in
`pkgs/development/python-modules`.

While at it, some other minor changes were made as well, such as
replacing `fetchurl` calls with `fetchPypi`.
2018-06-23 18:14:26 +02:00

36 lines
816 B
Nix

{ 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'"
'';
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;
};
}