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