@@ -1,38 +1,34 @@
11{ lib
22, buildPythonPackage
33, fetchFromGitHub
4−, fetchpatch
54, poetry-core
65, rich
76, typing-extensions
87, pytestCheckHook
8+, pythonOlder
99}:
1010
1111buildPythonPackage rec {
1212 pname = "textual";
13− version = "0.1.15";
13+ version = "0.1.18";
1414 format = "pyproject";
1515
16+ disabled = pythonOlder "3.7";
17+
1618 src = fetchFromGitHub {
1719 owner = "Textualize";
1820 repo = pname;
1921 rev = "v${version}";
20− sha256 = "1jmjais0yq8dwi9yikgrxdw4rwp8aq1981nhfxn0v97jb07i4cj6";
22+ sha256 = "sha256-XVmbt8r5HL8r64ISdJozmM+9HuyvqbpdejWICzFnfiw=";
2123 };
2224
23− patches = [
24− (fetchpatch {
25− # v0.1.15 git tag has 0.1.14 in pyproject.toml
26− name = "version.patch";
27− url = "https://github.com/Textualize/textual/commit/1b8d7d184e10889002425641222702afba508aea.patch";
28− sha256 = "1nfqp5f8ba3fg0ar3lghrlqypbjbsaywxaz3iiff8fy8j2wgsppp";
29− })
25+ nativeBuildInputs = [
26+ poetry-core
3027 ];
3128
32− nativeBuildInputs = [ poetry-core ];
33−
3429 propagatedBuildInputs = [
3530 rich
31+ ] ++ lib.optionals (pythonOlder "3.9") [
3632 typing-extensions
3733 ];
3834
@@ -40,7 +36,14 @@ buildPythonPackage rec {
4036 pytestCheckHook
4137 ];
4238
43− pythonImportsCheck = [ "textual" ];
39+ postPatch = ''
40+ substituteInPlace pyproject.toml \
41+ --replace 'rich = "^12.3.0"' 'rich = "*"'
42+ '';
43+
44+ pythonImportsCheck = [
45+ "textual"
46+ ];
4447
4548 meta = with lib; {
4649 description = "TUI framework for Python inspired by modern web development";