1{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, six
2, wcwidth, pytest, mock, glibcLocales
3}:
4
5let
6
7 fixTestSuiteFailure_1 = fetchpatch {
8 url = "https://github.com/jquast/blessed/pull/108/commits/76a54d39b0f58bfc71af04ee143459eefb0e1e7b.patch";
9 sha256 = "1higmv4c03ly7ywac1d7s71f3hrl531vj16nsfl9xh6zh9c47qcg";
10 };
11
12 fixTestSuiteFailure_2 = fetchpatch {
13 url = "https://github.com/jquast/blessed/pull/108/commits/aa94e01aed745715e667601fb674844b257cfcc9.patch";
14 sha256 = "1frygr6sc1vakdfx1hf6jj0dbwibiqz8hw9maf1b605cbslc9nay";
15 };
16
17in
18
19buildPythonPackage rec {
20 pname = "blessed";
21 version = "1.15.0";
22
23 src = fetchPypi {
24 inherit pname version;
25 sha256 = "777b0b6b5ce51f3832e498c22bc6a093b6b5f99148c7cbf866d26e2dec51ef21";
26 };
27
28 patches = [ fixTestSuiteFailure_1 fixTestSuiteFailure_2 ];
29
30 checkInputs = [ pytest mock glibcLocales ];
31
32 checkPhase = ''
33 LANG=en_US.utf-8 py.test blessed/tests
34 '';
35
36 propagatedBuildInputs = [ wcwidth six ];
37
38 meta = with stdenv.lib; {
39 homepage = "https://github.com/jquast/blessed";
40 description = "A thin, practical wrapper around terminal capabilities in Python.";
41 maintainers = with maintainers; [ eqyiel ];
42 license = licenses.mit;
43 };
44}