15 buildPythonPackage rec {
20 # Don't use wheels on PyPI
21 src = fetchFromGitHub {
23 repo = "python-${pname}";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-r+dKGv0a7AU+Ef94AGCCJLQolLqTTxaNmqRQYkxk15s=";
29 # Tags on GitHub still have a postfix (-dev0)
30 sed -i 's/\(version = "\)[^"]*\(".*\)/\1${version}\2/' pyproject.toml
31 # run Linux tests on Darwin as well
32 # see https://github.com/magmax/python-readchar/pull/99 for why this is not upstreamed
33 substituteInPlace tests/linux/conftest.py \
34 --replace 'sys.platform.startswith("linux")' 'sys.platform.startswith(("darwin", "linux"))'
37 build-system = [ setuptools ];
39 pythonImportsCheck = [ "readchar" ];
48 description = "Python library to read characters and key strokes";
49 homepage = "https://github.com/magmax/python-readchar";
50 changelog = "https://github.com/magmax/python-readchar/releases/tag/v${version}";
51 license = licenses.mit;
52 maintainers = with maintainers; [ mmahut ];