diff --git a/pkgs/development/python-modules/textual/default.nix b/pkgs/development/python-modules/textual/default.nix new file mode 100644 index 000000000000..e14c64730a23 --- /dev/null +++ b/pkgs/development/python-modules/textual/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, poetry-core +, rich +, typing-extensions +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "textual"; + version = "0.1.15"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "Textualize"; + repo = pname; + rev = "v${version}"; + sha256 = "1jmjais0yq8dwi9yikgrxdw4rwp8aq1981nhfxn0v97jb07i4cj6"; + }; + + patches = [ + (fetchpatch { + # v0.1.15 git tag has 0.1.14 in pyproject.toml + name = "version.patch"; + url = "https://github.com/Textualize/textual/commit/1b8d7d184e10889002425641222702afba508aea.patch"; + sha256 = "1nfqp5f8ba3fg0ar3lghrlqypbjbsaywxaz3iiff8fy8j2wgsppp"; + }) + ]; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + rich + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 98f8e708c731..98e89317835a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9838,6 +9838,8 @@ in { textile = callPackage ../development/python-modules/textile { }; + textual = callPackage ../development/python-modules/textual { }; + testing-common-database = callPackage ../development/python-modules/testing-common-database { }; testing-postgresql = callPackage ../development/python-modules/testing-postgresql { };