2021-02-03 22:22:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-03-10 14:08:30 +00:00
|
|
|
, isPy27
|
2021-02-03 22:22:29 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pymeeus
|
|
|
|
, pytz
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-03-09 15:20:54 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "convertdate";
|
2021-03-13 23:51:49 +00:00
|
|
|
version = "2.3.2";
|
2021-03-10 14:08:30 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2020-03-09 15:20:54 +00:00
|
|
|
# Tests are not available in the PyPI tarball so use GitHub instead.
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fitnr";
|
|
|
|
repo = pname;
|
2021-03-13 23:51:49 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0k7j59sbqwyi72vcjx5vsh3qb6hxfnkfjkd2i6f6lckdr1bkh7fz";
|
2020-03-09 15:20:54 +00:00
|
|
|
};
|
|
|
|
|
2021-02-03 22:22:29 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pymeeus
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-03-09 15:20:54 +00:00
|
|
|
|
2021-03-13 23:51:49 +00:00
|
|
|
pythonImportsCheck = [ "convertdate" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-09 15:20:54 +00:00
|
|
|
homepage = "https://github.com/fitnr/convertdate";
|
|
|
|
description = "Utils for converting between date formats and calculating holidays";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|