1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fetchpatch,
6 flit-core,
7 pythonOlder,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "ptyprocess";
13 version = "0.7.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-XF0KO0jO7gtISF4MJgN8Cs19KXZco/u1yzgx00dCMiA=";
21 };
22
23 patches = [
24 # Remove after https://github.com/pexpect/ptyprocess/pull/64 is merged.
25 (fetchpatch {
26 url = "https://github.com/pexpect/ptyprocess/commit/40c1ccf3432a6787be1801ced721540e34c6cd87.patch";
27 hash = "sha256-IemngBqBq3QRCmVscWtsuXHiFgvTOJIIB9SyAvsqHd0=";
28 })
29 ];
30
31 nativeBuildInputs = [ flit-core ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "ptyprocess" ];
36
37 meta = with lib; {
38 description = "Run a subprocess in a pseudo terminal";
39 homepage = "https://github.com/pexpect/ptyprocess";
40 changelog = "https://github.com/pexpect/ptyprocess/releases/tag/${version}";
41 license = licenses.isc;
42 maintainers = with maintainers; [ ];
43 };
44}