@@ -2,17 +2,16 @@
22, buildPythonPackage
33, pythonOlder
44, fetchFromGitHub
5−, poetry
5+, poetry-core
6+, fetchpatch
67, pytestCheckHook
7−, pytestcov
8−, pytestrunner
98, pycodestyle
109, pyyaml
1110}:
1211
1312buildPythonPackage rec {
1413 pname = "tinydb";
15− version = "4.1.1";
14+ version = "4.4.0";
1615 disabled = pythonOlder "3.5";
1716 format = "pyproject";
1817
@@ -20,20 +19,37 @@ buildPythonPackage rec {
2019 owner = "msiemens";
2120 repo = pname;
2221 rev = "v${version}";
23− sha256 = "09cwdmpj91c6q7jympip1lrcd3idbm9cqblgvmrh0v1vy1iv2ki7";
22+ sha256 = "sha256-3FbsnLU7G4VVhI5NYRqCEQgo51zDeAkEhH69H52zr/w=";
2423 };
2524
26− nativeBuildInputs = [ poetry ];
25+ nativeBuildInputs = [
26+ poetry-core
27+ ];
28+
29+ patches = [
30+ # Switch to poetry-core, https://github.com/msiemens/tinydb/pull/391
31+ (fetchpatch {
32+ name = "switch-to-peotry-core.patch";
33+ url = "https://github.com/msiemens/tinydb/commit/5b547c18e7ce9f5925d5943dfa47d408435a0da5.patch";
34+ sha256 = "19ma9ib020b82sn1mcr7sfysqbj8h6nbb365bih1x1wn3ym8xlbc";
35+ })
36+ ];
37+
38+ postPatch = ''
39+ substituteInPlace pytest.ini \
40+ --replace "--cov-append --cov-report term --cov tinydb" ""
41+ '';
2742
2843 checkInputs = [
2944 pytestCheckHook
30− pytestcov
3145 pycodestyle
3246 pyyaml
3347 ];
3448
49+ pythonImportsCheck = [ "tinydb" ];
50+
3551 meta = with lib; {
36− description = "A lightweight document oriented database written in pure Python with no external dependencies";
52+ description = "Lightweight document oriented database written in Python";
3753 homepage = "https://tinydb.readthedocs.org/";
3854 changelog = "https://tinydb.readthedocs.io/en/latest/changelog.html";
3955 license = licenses.mit;