2021-07-24 12:14:16 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python-editor, readchar, blessed, pytest, pytest-cov, pexpect, pytest-mock }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "inquirer";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "2.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +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";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
propagatedBuildInputs = [ blessed python-editor readchar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2020-10-07 09:15:18 +00:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "blessed==1.17.6" "blessed~=1.17" \
|
|
|
|
--replace "readchar==2.0.1" "readchar>=2.0.0"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
checkInputs = [ pytest pytest-cov pexpect pytest-mock ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest --cov-report=term-missing --cov inquirer --no-cov-on-fail tests/unit tests/integration
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|