1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, pythonOlder
6, click
7, click-default-group
8, python-dateutil
9, sqlite-fts4
10, tabulate
11, pytestCheckHook
12, hypothesis
13}:
14
15buildPythonPackage rec {
16 pname = "sqlite-utils";
17 version = "3.32.1";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-bCj+Mvzr1lihaR3t+k0RFJmtMCzAE5xaWJOlkNRhhIo=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace "click-default-group-wheel" "click-default-group"
30 '';
31
32 propagatedBuildInputs = [
33 click
34 click-default-group
35 python-dateutil
36 sqlite-fts4
37 tabulate
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 hypothesis
43 ];
44
45 pythonImportsCheck = [
46 "sqlite_utils"
47 ];
48
49 meta = with lib; {
50 description = "Python CLI utility and library for manipulating SQLite databases";
51 homepage = "https://github.com/simonw/sqlite-utils";
52 changelog = "https://github.com/simonw/sqlite-utils/releases/tag/${version}";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ meatcar techknowlogick ];
55 };
56}