nixpkgs/pkgs/development/python-modules/tinydb/default.nix

49 lines
998 B
Nix
Raw Normal View History

2019-08-07 07:13:33 +00:00
{ lib
, buildPythonPackage
, pythonOlder
2019-08-07 07:13:33 +00:00
, fetchFromGitHub
2021-04-15 21:04:25 +00:00
, poetry-core
, pytestCheckHook
2019-08-07 07:13:33 +00:00
, pycodestyle
, pyyaml
}:
buildPythonPackage rec {
pname = "tinydb";
version = "4.5.2";
disabled = pythonOlder "3.5";
format = "pyproject";
2019-08-07 07:13:33 +00:00
src = fetchFromGitHub {
owner = "msiemens";
repo = pname;
rev = "v${version}";
sha256 = "0gyc9rk1adw4gynwnv4kfas0hxv1cql0sm5b3fsms39088ha894l";
2019-08-07 07:13:33 +00:00
};
2021-04-15 21:04:25 +00:00
nativeBuildInputs = [
poetry-core
];
postPatch = ''
substituteInPlace pytest.ini \
--replace "--cov-append --cov-report term --cov tinydb" ""
'';
2019-08-07 07:13:33 +00:00
checkInputs = [
pytestCheckHook
2019-08-07 07:13:33 +00:00
pycodestyle
pyyaml
];
2021-04-15 21:04:25 +00:00
pythonImportsCheck = [ "tinydb" ];
2019-08-07 07:13:33 +00:00
meta = with lib; {
2021-04-15 21:04:25 +00:00
description = "Lightweight document oriented database written in Python";
homepage = "https://tinydb.readthedocs.org/";
changelog = "https://tinydb.readthedocs.io/en/latest/changelog.html";
license = licenses.mit;
2019-08-07 07:13:33 +00:00
maintainers = with maintainers; [ marcus7070 ];
};
}