Commit b32a3ccd authored by Sigmanificient's avatar Sigmanificient
Browse files

pynputfix: init at 1.8.2

parent 533335db
Loading
Loading
Loading
Loading
+69 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  gitUpdater,

  # build-system
  setuptools,
  setuptools-lint,
  sphinx,

  # dependencies
  xlib,
  evdev,
  six,

  # tests
  unittestCheckHook,
}:

buildPythonPackage {
  pname = "pynputfix";
  version = "1.8.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "AuroraWright";
    repo = "pynputfix";
    tag = "1.8.2";
    hash = "sha256-SKw745hh0G2NoWgUUjShyjiG2NYPd4iJlWx7IeGpW/4=";
  };

  passthru.updateScript = gitUpdater {
    rev-prefix = "v";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace-fail "'sphinx >=1.3.1'," "" \
      --replace-fail "'twine >=4.0']" "]"
  '';

  nativeBuildInputs = [
    setuptools
    setuptools-lint
    sphinx
  ];

  propagatedBuildInputs = [
    six
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [
    evdev
    xlib
  ];

  doCheck = false; # requires running X server

  nativeCheckInputs = [ unittestCheckHook ];

  meta = {
    broken = stdenv.hostPlatform.isDarwin;
    description = "Library to control and monitor input devices";
    homepage = "https://github.com/moses-palmer/pynput";
    license = lib.licenses.lgpl3;
    maintainers = with lib.maintainers; [ sigmanificient ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -14360,6 +14360,8 @@ self: super: with self; {
  pynput = callPackage ../development/python-modules/pynput { };
  pynputfix = callPackage ../development/python-modules/pynputfix { };
  pynrrd = callPackage ../development/python-modules/pynrrd { };
  pynslookup = callPackage ../development/python-modules/pynslookup { };