2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-10-07 09:15:18 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-04-17 00:35:05 +00:00
|
|
|
, poetry-core
|
2020-10-07 09:15:18 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, pycodestyle
|
|
|
|
, pyyaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tinydb";
|
2022-01-23 02:10:13 +00:00
|
|
|
version = "4.6.1";
|
2020-10-07 09:15:18 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "msiemens";
|
|
|
|
repo = pname;
|
2020-10-07 09:15:18 +00:00
|
|
|
rev = "v${version}";
|
2022-01-23 02:10:13 +00:00
|
|
|
sha256 = "17m8g6xzwa0k8qb4k4p9hjcyv58gmxz1lkvr2ckc5csa0ydvv91a";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov-append --cov-report term --cov tinydb" ""
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
2020-10-07 09:15:18 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
pycodestyle
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
pythonImportsCheck = [ "tinydb" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-04-17 00:35:05 +00:00
|
|
|
description = "Lightweight document oriented database written in Python";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://tinydb.readthedocs.org/";
|
|
|
|
changelog = "https://tinydb.readthedocs.io/en/latest/changelog.html";
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ marcus7070 ];
|
|
|
|
};
|
|
|
|
}
|