at 23.05-pre 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry-core 5, rich 6, typing-extensions 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "textual"; 13 version = "0.1.18"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "Textualize"; 20 repo = pname; 21 rev = "v${version}"; 22 sha256 = "sha256-XVmbt8r5HL8r64ISdJozmM+9HuyvqbpdejWICzFnfiw="; 23 }; 24 25 nativeBuildInputs = [ 26 poetry-core 27 ]; 28 29 propagatedBuildInputs = [ 30 rich 31 ] ++ lib.optionals (pythonOlder "3.9") [ 32 typing-extensions 33 ]; 34 35 checkInputs = [ 36 pytestCheckHook 37 ]; 38 39 postPatch = '' 40 substituteInPlace pyproject.toml \ 41 --replace 'rich = "^12.3.0"' 'rich = "*"' 42 ''; 43 44 pythonImportsCheck = [ 45 "textual" 46 ]; 47 48 meta = with lib; { 49 description = "TUI framework for Python inspired by modern web development"; 50 homepage = "https://github.com/Textualize/textual"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ jyooru ]; 53 }; 54}