blob: bdb2a33f810964c626fe5bdacd80cccabd9bc7cf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
{
lib,
buildPythonPackage,
fetchPypi,
ncurses,
x256,
}:
buildPythonPackage rec {
pname = "unicurses";
version = "3.1.2";
format = "setuptools";
src = fetchPypi {
inherit version;
pname = "Uni-Curses";
hash = "sha256-M4mjdmy2NSf5KiTVYznPy86bVgZB5u1vDi6GIH1Frc4=";
};
propagatedBuildInputs = [ x256 ];
# Necessary because ctypes.util.find_library does not find the ncurses libraries
postPatch = ''
substituteInPlace './unicurses/__init__.py' \
--replace-fail "find_library('ncursesw')" '"${ncurses}/lib/libncursesw.so.6"' \
--replace-fail "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 ];
};
}
|