Unverified Commit ad9be71c authored by Dominic Shelton's avatar Dominic Shelton
Browse files

pythonPackages.pyudev: Allow to install on darwin

parent 5b523b15
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
{ lib, fetchPypi, buildPythonPackage
, six, udev, pytest, mock, hypothesis, docutils
{ lib
, fetchPypi
, buildPythonPackage
, six
, udev
, pytest
, mock
, hypothesis
, docutils
, stdenvNoCC
}:

buildPythonPackage rec {
@@ -11,7 +19,7 @@ buildPythonPackage rec {
    hash = "sha256-deVNNyGPWsRbDaHw/ZzF5SajysPvHPrUEM96sziwFHE=";
  };

  postPatch = ''
  postPatch = lib.optionalString stdenvNoCC.isLinux ''
    substituteInPlace src/pyudev/_ctypeslib/utils.py \
      --replace "find_library(name)" "'${lib.getLib udev}/lib/libudev.so'"
    '';
@@ -27,9 +35,10 @@ buildPythonPackage rec {
  # https://github.com/pyudev/pyudev/issues/187
  doCheck = false;

  meta = {
  meta = with lib; {
    homepage = "https://pyudev.readthedocs.org/";
    description = "Pure Python libudev binding";
    license = lib.licenses.lgpl21Plus;
    license = licenses.lgpl21Plus;
    maintainers = with maintainers; [ frogamic ];
  };
}