1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# native
6, flake8
7
8# tests
9, pytestCheckHook
10, pexpect
11}:
12
13buildPythonPackage rec {
14 pname = "readchar";
15 version = "3.0.5";
16 format = "setuptools";
17
18 # Don't use wheels on PyPI
19 src = fetchFromGitHub {
20 owner = "magmax";
21 repo = "python-${pname}";
22 rev = "v${version}";
23 sha256 = "sha256:01bjw3ipdzxq1ijn9354nlya625i26ri7jac1dnlj1d1gdd8m5lx";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.cfg \
28 --replace "--cov readchar" ""
29 '';
30
31 nativeBuildInputs = [
32 flake8
33 ];
34
35 checkInputs = [
36 pytestCheckHook
37 pexpect
38 ];
39
40 meta = with lib; {
41 homepage = "https://github.com/magmax/python-readchar";
42 description = "Python library to read characters and key strokes";
43 license = licenses.mit;
44 maintainers = [ maintainers.mmahut ];
45 };
46}