1{ lib, buildPythonPackage, fetchPypi, ncurses, x256 }: 2 3buildPythonPackage rec { 4 pname = "unicurses"; 5 version = "2.1.3"; 6 format = "setuptools"; 7 8 src = fetchPypi { 9 inherit version; 10 pname = "Uni-Curses"; 11 hash = "sha256-uzSiF0jAZzI0iZngM/GuJ60o+UbLQ5XQzycTPito34w="; 12 }; 13 14 propagatedBuildInputs = [ x256 ]; 15 16 # Necessary because ctypes.util.find_library does not find the ncurses libraries 17 postPatch = '' 18 substituteInPlace './unicurses/__init__.py' \ 19 --replace "find_library('ncursesw')" '"${ncurses}/lib/libncursesw.so.6"' \ 20 --replace "find_library('panelw')" '"${ncurses}/lib/libpanelw.so.6"' 21 ''; 22 23 pythonImportsCheck = [ "unicurses" ]; 24 25 meta = with lib; { 26 description = "Unified Curses Wrapper for Python"; 27 homepage = "https://github.com/unicurses/unicurses"; 28 license = licenses.gpl3Only; 29 maintainers = with maintainers; [ michaelBelsanti ]; 30 }; 31}