1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 poetry-core,
8 poetry-dynamic-versioning,
9
10 # dependencies
11 aiofile,
12 typing-extensions,
13
14 # tests
15 pytestCheckHook,
16 pytest-asyncio,
17 pytest-cov-stub,
18 pytest-mock,
19 pytest-randomly,
20 faker,
21}:
22
23buildPythonPackage rec {
24 pname = "nonbloat-db";
25 version = "0.1.4";
26 pyproject = true;
27
28 src = fetchFromGitHub {
29 owner = "PerchunPak";
30 repo = "nonbloat-db";
31 tag = "v${version}";
32 hash = "sha256-x6QFOZ+RYdophuRXMKE4RNi1xDnsa3naUMDbn1vG7hM=";
33 };
34
35 build-system = [
36 poetry-core
37 poetry-dynamic-versioning
38 ];
39
40 dependencies = [
41 aiofile
42 typing-extensions
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 pytest-asyncio
48 pytest-cov-stub
49 pytest-mock
50 pytest-randomly
51 faker
52 ];
53
54 pythonImportsCheck = [
55 "nbdb"
56 "nbdb.storage"
57 ];
58
59 disabledTests = [
60 # flaky
61 "test_write_in_background"
62 ];
63
64 meta = {
65 description = "Simple key-value database for my small projects";
66 homepage = "https://github.com/PerchunPak/nonbloat-db";
67 changelog = "https://github.com/PerchunPak/nonbloat-db/blob/v${version}/CHANGES.md";
68 license = lib.licenses.agpl3Only;
69 maintainers = with lib.maintainers; [ perchun ];
70 };
71}