summary refs log tree commit diff
path: root/pkgs/development/python-modules/aiosqlite/default.nix
blob: 02f0a425858db65b1404cbb9e85411a513df6037 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, aiounittest
, buildPythonPackage
, fetchFromGitHub
, flit-core
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "aiosqlite";
  version = "0.18.0";
  format = "pyproject";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "omnilib";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-yPGSKqjOz1EY5/V0oKz2EiZ90q2O4TINoXdxHuB7Gqk=";
  };

  nativeBuildInputs = [
    flit-core
  ];

  nativeCheckInputs = [
    aiounittest
    pytestCheckHook
  ];

  # Tests are not pick-up automatically by the hook
  pytestFlagsArray = [
    "aiosqlite/tests/*.py"
  ];

  pythonImportsCheck = [
    "aiosqlite"
  ];

  meta = with lib; {
    description = "Asyncio bridge to the standard sqlite3 module";
    homepage = "https://github.com/jreese/aiosqlite";
    changelog = "https://github.com/omnilib/aiosqlite/blob/v${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ costrouc ];
  };
}