Skip to content
Permalink
Browse files

pyudev

  • Loading branch information
peterhoeg committed Mar 24, 2017
1 parent 73a6832 commit 65a871359a2d24835718c83621694610f33dce97
Showing with 20 additions and 12 deletions.
  1. +18 −11 pkgs/development/python-modules/pyudev.nix
  2. +2 −1 pkgs/top-level/python-packages.nix
@@ -1,8 +1,6 @@
{ lib, fetchurl, buildPythonPackage
, six, systemd
}:
{ lib, fetchurl, libudev, pythonPackages }:

buildPythonPackage rec {
pythonPackages.buildPythonPackage rec {
name = "pyudev-${version}";
version = "0.21.0";

@@ -12,15 +10,24 @@ buildPythonPackage rec {
};

postPatch = ''
substituteInPlace src/pyudev/_ctypeslib/libudev.py \
--replace "find_library('udev')" "'${systemd.lib}/lib/libudev.so'"
'';
#substituteInPlace src/pyudev/_ctypeslib/libudev.py \
#--replace "find_library('udev')" "'{systemd.lib}/lib/libudev.so'"
propagatedBuildInputs = [ systemd six ];
#stat {systemd.lib}/lib/libudev.so
#exit 1
'';

meta = {
homepage = "http://pyudev.readthedocs.org/";
# buildInputs = [ libudev ];
propagatedBuildInputs = [ libudev ] ++ (with pythonPackages; [ six ]);
checkInputs = with pythonPackages; [ docutils hypothesis mock pytest ];

checkPhase = ''
pytest tests
'';

meta = with lib; {
homepage = http://pyudev.readthedocs.org/;
description = "Pure Python libudev binding";
license = lib.licenses.lgpl21Plus;
license = licenses.lgpl21Plus;
};
}
};

pyudev = callPackage ../development/python-modules/pyudev.nix {
inherit (pkgs) fetchurl systemd;
inherit (pkgs) fetchurl libudev;
pythonPackages = self;
};

pynzb = buildPythonPackage (rec {

0 comments on commit 65a8713

Please sign in to comment.
You can’t perform that action at this time.