Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.2 kB view raw
1{ lib 2, ansicolors 3, buildPythonPackage 4, fetchPypi 5, pytestCheckHook 6, pythonOlder 7, textwrap3 8}: 9 10buildPythonPackage rec { 11 pname = "ansiwrap"; 12 version = "0.8.4"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchPypi { 18 inherit pname version; 19 extension = "zip"; 20 sha256 = "ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7"; 21 }; 22 23 postPatch = '' 24 # https://github.com/jonathaneunice/ansiwrap/issues/18 25 substituteInPlace test/test_ansiwrap.py \ 26 --replace "set(range(20, 120)).difference(LINE_LENGTHS)" "sorted(set(range(20, 120)).difference(LINE_LENGTHS))" \ 27 --replace "set(range(120, 400)).difference(LINE_LENGTHS)" "sorted(set(range(120, 400)).difference(LINE_LENGTHS))" 28 ''; 29 30 checkInputs = [ 31 ansicolors 32 pytestCheckHook 33 ]; 34 35 propagatedBuildInputs = [ 36 textwrap3 37 ]; 38 39 pythonImportsCheck = [ 40 "ansiwrap" 41 ]; 42 43 meta = with lib; { 44 description = "Textwrap, but savvy to ANSI colors and styles"; 45 homepage = "https://github.com/jonathaneunice/ansiwrap"; 46 changelog = "https://github.com/jonathaneunice/ansiwrap/blob/master/CHANGES.yml"; 47 license = licenses.asl20; 48 maintainers = with maintainers; [ costrouc ]; 49 }; 50}