1{ stdenv, buildPythonPackage, fetchPypi, python-editor, readchar, blessings, pytest, pytestcov, pexpect, pytest-mock }:
2
3buildPythonPackage rec {
4 pname = "inquirer";
5 version = "2.6.3";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "01lf51y3bxsxkghbdk9hr42yvihpwi2s5zpxnra3bx41r35msvjz";
10 };
11
12 propagatedBuildInputs = [ python-editor readchar blessings ];
13
14 # No real changes in 2.0.0...e0edfa3
15 postPatch = ''
16 substituteInPlace setup.py \
17 --replace "readchar == 2.0.1" "readchar >= 2.0.0"
18 '';
19
20 checkInputs = [ pytest pytestcov pexpect pytest-mock ];
21
22 checkPhase = ''
23 pytest --cov-report=term-missing --cov inquirer --no-cov-on-fail tests/unit tests/integration
24 '';
25
26 meta = with stdenv.lib; {
27 homepage = "https://github.com/magmax/python-inquirer";
28 description = "A collection of common interactive command line user interfaces, based on Inquirer.js";
29 license = licenses.mit;
30 maintainers = [ maintainers.mmahut ];
31 };
32}