2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchpatch
|
2022-03-30 09:31:56 +00:00
|
|
|
, isPy3k
|
|
|
|
, glibcLocales
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "urwid";
|
2020-11-19 00:13:47 +00:00
|
|
|
version = "2.1.2";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-19 00:13:47 +00:00
|
|
|
sha256 = "588bee9c1cb208d0906a9f73c613d2bd32c3ed3702012f51efe318a3f2127eae";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/urwid/urwid/pull/517
|
|
|
|
(fetchpatch {
|
|
|
|
name = "python311-compat.patch";
|
|
|
|
url = "https://github.com/urwid/urwid/commit/42c1ed1eeb663179b265bae9b384d7ec11c8a9b5.patch";
|
|
|
|
hash = "sha256-Oz8O/M6AdqbB6C/BB5rtxp8FgdGhZUxkSxKIyq5Dmho=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# tests need to be able to set locale
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ glibcLocales ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# tests which assert on strings don't decode results correctly
|
|
|
|
doCheck = isPy3k;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"urwid"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A full-featured console (xterm et al.) user interface library";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://urwid.org/";
|
|
|
|
license = licenses.lgpl21Plus;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|