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";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "4.5.0";
|
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}";
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "sha256-rJVJfsPhGTQpE6p0kzN6GDR0r9M71ADa67Oi5jLgeWY=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|