2020-11-06 00:33:48 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-12-26 17:43:05 +00:00
|
|
|
, fetchpatch
|
2020-12-25 13:55:36 +00:00
|
|
|
, pythonOlder
|
2020-11-06 00:33:48 +00:00
|
|
|
, click
|
|
|
|
, click-default-group
|
2022-01-26 04:04:25 +00:00
|
|
|
, python-dateutil
|
2020-12-25 13:55:36 +00:00
|
|
|
, sqlite-fts4
|
2020-11-06 00:33:48 +00:00
|
|
|
, tabulate
|
2023-08-04 22:07:22 +00:00
|
|
|
, pluggy
|
2020-11-06 00:33:48 +00:00
|
|
|
, pytestCheckHook
|
2020-12-25 13:55:36 +00:00
|
|
|
, hypothesis
|
2023-08-04 22:07:22 +00:00
|
|
|
, testers
|
|
|
|
, sqlite-utils
|
2020-11-06 00:33:48 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlite-utils";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.36";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-3MMROU/obcFvZQN7AHXiOO/P0uEuZdU+0ZaVRQKZbzw=";
|
2020-11-06 00:33:48 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "click-default-group-wheel" "click-default-group"
|
|
|
|
'';
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
click-default-group
|
2022-01-26 04:04:25 +00:00
|
|
|
python-dateutil
|
2020-12-25 13:55:36 +00:00
|
|
|
sqlite-fts4
|
2020-11-06 00:33:48 +00:00
|
|
|
tabulate
|
2023-08-04 22:07:22 +00:00
|
|
|
pluggy
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-11-06 00:33:48 +00:00
|
|
|
pytestCheckHook
|
2020-12-25 13:55:36 +00:00
|
|
|
hypothesis
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"sqlite_utils"
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = sqlite-utils;
|
|
|
|
};
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python CLI utility and library for manipulating SQLite databases";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sqlite-utils";
|
2020-11-06 00:33:48 +00:00
|
|
|
homepage = "https://github.com/simonw/sqlite-utils";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/simonw/sqlite-utils/releases/tag/${version}";
|
2020-11-06 00:33:48 +00:00
|
|
|
license = licenses.asl20;
|
2022-05-18 14:49:53 +00:00
|
|
|
maintainers = with maintainers; [ meatcar techknowlogick ];
|
2020-11-06 00:33:48 +00:00
|
|
|
};
|
|
|
|
}
|