1{ lib, fetchPypi, buildPythonPackage, pytest }:
2
3buildPythonPackage rec {
4 pname = "wcwidth";
5 version = "0.1.7";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx";
10 };
11
12 checkInputs = [ pytest ];
13
14 # To prevent infinite recursion with pytest
15 doCheck = false;
16
17 checkPhase = ''
18 pytest
19 '';
20
21 meta = with lib; {
22 description = "Measures number of Terminal column cells of wide-character codes";
23 longDescription = ''
24 This API is mainly for Terminal Emulator implementors -- any Python
25 program that attempts to determine the printable width of a string on
26 a Terminal. It is implemented in python (no C library calls) and has
27 no 3rd-party dependencies.
28 '';
29 homepage = https://github.com/jquast/wcwidth;
30 license = licenses.mit;
31 };
32}