1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, poetry-core
6, pytestCheckHook
7, pycodestyle
8, pyyaml
9}:
10
11buildPythonPackage rec {
12 pname = "tinydb";
13 version = "4.8.0";
14 disabled = pythonOlder "3.5";
15 format = "pyproject";
16
17 src = fetchFromGitHub {
18 owner = "msiemens";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 hash = "sha256-sdWcpkjC8LtOI1k0Wyk4vLXBcwYe1vuQON9J7P8JPxA=";
22 };
23
24 nativeBuildInputs = [
25 poetry-core
26 ];
27
28 postPatch = ''
29 substituteInPlace pytest.ini \
30 --replace "--cov-append --cov-report term --cov tinydb" ""
31 '';
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 pycodestyle
36 pyyaml
37 ];
38
39 pythonImportsCheck = [ "tinydb" ];
40
41 meta = with lib; {
42 description = "Lightweight document oriented database written in Python";
43 homepage = "https://tinydb.readthedocs.org/";
44 changelog = "https://tinydb.readthedocs.io/en/latest/changelog.html";
45 license = licenses.mit;
46 maintainers = with maintainers; [ marcus7070 ];
47 };
48}