2020-10-05 04:30:51 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, python-editor, readchar, blessed, pytest, pytestcov, pexpect, pytest-mock }:
|
2019-06-15 08:42:30 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "inquirer";
|
2020-08-16 17:31:04 +00:00
|
|
|
version = "2.7.0";
|
2019-06-15 08:42:30 +00:00
|
|
|
|
2020-10-05 04:30:51 +00:00
|
|
|
# PyPi archive currently broken: https://github.com/magmax/python-inquirer/issues/106
|
|
|
|
src = fetchFromGitHub rec {
|
|
|
|
owner = "magmax";
|
|
|
|
repo = "python-inquirer";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "152l5qjgkag8zkr69ax2i5s8xcac1qvyngisrplbnbzwbpf77d0d";
|
2019-06-15 08:42:30 +00:00
|
|
|
};
|
|
|
|
|
2020-10-05 04:30:51 +00:00
|
|
|
propagatedBuildInputs = [ blessed python-editor readchar ];
|
2019-06-15 08:42:30 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2020-10-05 04:30:51 +00:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "blessed==1.17.6" "blessed~=1.17" \
|
|
|
|
--replace "readchar==2.0.1" "readchar>=2.0.0"
|
2019-06-15 08:42:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ pytest pytestcov pexpect pytest-mock ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest --cov-report=term-missing --cov inquirer --no-cov-on-fail tests/unit tests/integration
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/magmax/python-inquirer";
|
|
|
|
description = "A collection of common interactive command line user interfaces, based on Inquirer.js";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.mmahut ];
|
|
|
|
};
|
|
|
|
}
|