Files
nixpkgs/pkgs/development/python-modules/pynput/default.nix
Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00

68 lines
1.2 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
gitUpdater,
# build-system
setuptools,
setuptools-lint,
sphinx,
# dependencies
xlib,
evdev,
six,
# tests
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "pynput";
version = "1.8.1";
pyproject = true;
src = fetchFromGitHub {
owner = "moses-palmer";
repo = "pynput";
tag = "v${version}";
hash = "sha256-rOkUyreS3JqEyubQUdNLJf5lDuFassDKrQrUXKrKlgI=";
};
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 = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Library to control and monitor input devices";
homepage = "https://github.com/moses-palmer/pynput";
license = licenses.lgpl3;
maintainers = with maintainers; [ nickhu ];
};
}