depot/third_party/nixpkgs/pkgs/development/python-modules/textual/default.nix
Default email 2ce5db779a Project import generated by Copybara.
GitOrigin-RevId: 48037fd90426e44e4bf03e6479e88a11453b9b66
2022-05-18 16:49:53 +02:00

54 lines
1,012 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, rich
, typing-extensions
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "textual";
version = "0.1.18";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Textualize";
repo = pname;
rev = "v${version}";
sha256 = "sha256-XVmbt8r5HL8r64ISdJozmM+9HuyvqbpdejWICzFnfiw=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
rich
] ++ lib.optionals (pythonOlder "3.9") [
typing-extensions
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'rich = "^12.3.0"' 'rich = "*"'
'';
pythonImportsCheck = [
"textual"
];
meta = with lib; {
description = "TUI framework for Python inspired by modern web development";
homepage = "https://github.com/Textualize/textual";
license = licenses.mit;
maintainers = with maintainers; [ jyooru ];
};
}