1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, click
6, click-default-group
7, dateutils
8, sqlite-fts4
9, tabulate
10, pytestCheckHook
11, hypothesis
12}:
13
14buildPythonPackage rec {
15 pname = "sqlite-utils";
16 version = "3.17.1";
17 disabled = pythonOlder "3.6";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "0cfde0c46a2d4c09d6df8609fe53642bc3ab443bcef3106d8f1eabeb3fccbe3d";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace '"pytest-runner"' ""
27 '';
28
29 propagatedBuildInputs = [
30 click
31 click-default-group
32 dateutils
33 sqlite-fts4
34 tabulate
35 ];
36
37 checkInputs = [
38 pytestCheckHook
39 hypothesis
40 ];
41
42 meta = with lib; {
43 description = "Python CLI utility and library for manipulating SQLite databases";
44 homepage = "https://github.com/simonw/sqlite-utils";
45 license = licenses.asl20;
46 maintainers = with maintainers; [ meatcar ];
47 };
48}