about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/textual/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/textual/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/textual/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/textual/default.nix b/nixpkgs/pkgs/development/python-modules/textual/default.nix
new file mode 100644
index 000000000000..e14c64730a23
--- /dev/null
+++ b/nixpkgs/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 ];
+  };
+}