1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, crashtest
5, poetry-core
6, pylev
7, pytest-mock
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "cleo";
13 version = "1.0.0a5";
14 format = "pyproject";
15
16 src = fetchFromGitHub {
17 owner = "python-poetry";
18 repo = pname;
19 rev = "refs/tags/${version}";
20 hash = "sha256-FtGGIRF/tA2OWEjkCFwa1HHg6VY+5E5mAiJC/zjUC1g=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace 'crashtest = "^0.3.1"' 'crashtest = "*"'
26 '';
27
28 nativeBuildInputs = [
29 poetry-core
30 ];
31
32 propagatedBuildInputs = [
33 crashtest
34 pylev
35 ];
36
37 pythonImportsCheck = [
38 "cleo"
39 "cleo.application"
40 "cleo.commands.command"
41 "cleo.helpers"
42 ];
43
44 checkInputs = [
45 pytest-mock
46 pytestCheckHook
47 ];
48
49 meta = with lib; {
50 homepage = "https://github.com/python-poetry/cleo";
51 description = "Allows you to create beautiful and testable command-line interfaces";
52 license = licenses.mit;
53 maintainers = with maintainers; [ jakewaksbaum ];
54 };
55}