depot/third_party/nixpkgs/pkgs/development/python-modules/unicurses/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

31 lines
911 B
Nix

{ lib, buildPythonPackage, fetchPypi, ncurses, x256 }:
buildPythonPackage rec {
pname = "unicurses";
version = "2.1.3";
format = "setuptools";
src = fetchPypi {
inherit version;
pname = "Uni-Curses";
hash = "sha256-uzSiF0jAZzI0iZngM/GuJ60o+UbLQ5XQzycTPito34w=";
};
propagatedBuildInputs = [ x256 ];
# Necessary because ctypes.util.find_library does not find the ncurses libraries
postPatch = ''
substituteInPlace './unicurses/__init__.py' \
--replace "find_library('ncursesw')" '"${ncurses}/lib/libncursesw.so.6"' \
--replace "find_library('panelw')" '"${ncurses}/lib/libpanelw.so.6"'
'';
pythonImportsCheck = [ "unicurses" ];
meta = with lib; {
description = "Unified Curses Wrapper for Python";
homepage = "https://github.com/unicurses/unicurses";
license = licenses.gpl3Only;
maintainers = with maintainers; [ michaelBelsanti ];
};
}