From 0339a7d8752014bcdd6d7ea46863336868e4222b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 30 Jan 2023 11:48:17 +0100 Subject: [PATCH] python310Packages.evdev: add changelog to meta - add pythonImportsCheck - disable on older Python releases --- .../python-modules/evdev/default.nix | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/evdev/default.nix b/pkgs/development/python-modules/evdev/default.nix index 354b10749938..5cd1d7b43d31 100644 --- a/pkgs/development/python-modules/evdev/default.nix +++ b/pkgs/development/python-modules/evdev/default.nix @@ -1,25 +1,41 @@ -{ lib, buildPythonPackage, fetchPypi, linuxHeaders }: +{ lib +, buildPythonPackage +, fetchPypi +, linuxHeaders +, pythonOlder +}: buildPythonPackage rec { pname = "evdev"; version = "1.6.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-7PoBtchPfoxs7TNnrJUoj0PNhO+/1919DNv8DRjIemo="; + hash = "sha256-7PoBtchPfoxs7TNnrJUoj0PNhO+/1919DNv8DRjIemo="; }; - buildInputs = [ linuxHeaders ]; + buildInputs = [ + linuxHeaders + ]; patchPhase = '' - substituteInPlace setup.py --replace /usr/include/linux ${linuxHeaders}/include/linux + substituteInPlace setup.py \ + --replace /usr/include/linux ${linuxHeaders}/include/linux ''; doCheck = false; + pythonImportsCheck = [ + "evdev" + ]; + meta = with lib; { description = "Provides bindings to the generic input event interface in Linux"; - homepage = "https://pythonhosted.org/evdev"; + homepage = "https://python-evdev.readthedocs.io/"; + changelog = "https://github.com/gvalkov/python-evdev/blob/v${version}/docs/changelog.rst"; license = licenses.bsd3; maintainers = with maintainers; [ goibhniu ]; platforms = platforms.linux;