Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / sqlite-utils / default.nix
blob92cc4ea62784ba7232e1b6b9bec69a9a6d590ef5
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 , pluggy
12 , pytestCheckHook
13 , hypothesis
14 , testers
15 , sqlite-utils
18 buildPythonPackage rec {
19   pname = "sqlite-utils";
20   version = "3.35.2";
21   format = "setuptools";
23   disabled = pythonOlder "3.7";
25   src = fetchPypi {
26     inherit pname version;
27     hash = "sha256-WQsUrSd5FMs/x9XiVHZIR/rNqqI8e6/YXsk4dPb0IUM=";
28   };
30   postPatch = ''
31     substituteInPlace setup.py \
32       --replace "click-default-group-wheel" "click-default-group"
33   '';
35   propagatedBuildInputs = [
36     click
37     click-default-group
38     python-dateutil
39     sqlite-fts4
40     tabulate
41     pluggy
42   ];
44   nativeCheckInputs = [
45     pytestCheckHook
46     hypothesis
47   ];
49   pythonImportsCheck = [
50     "sqlite_utils"
51   ];
53   passthru.tests.version = testers.testVersion {
54     package = sqlite-utils;
55   };
57   meta = with lib; {
58     description = "Python CLI utility and library for manipulating SQLite databases";
59     homepage = "https://github.com/simonw/sqlite-utils";
60     changelog = "https://github.com/simonw/sqlite-utils/releases/tag/${version}";
61     license = licenses.asl20;
62     maintainers = with maintainers; [ meatcar techknowlogick ];
63   };