2020-04-24 23:36:52 +00:00
|
|
|
{ lib, fetchPypi, buildPythonPackage, pythonOlder
|
2021-07-04 02:40:35 +00:00
|
|
|
, python-dateutil
|
2020-08-20 17:08:02 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, poetry
|
|
|
|
, poetry-core
|
|
|
|
, pytzdata
|
|
|
|
, typing
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pendulum";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "2.1.2";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
preBuild = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-07-04 02:40:35 +00:00
|
|
|
propagatedBuildInputs = [ python-dateutil pytzdata ]
|
2020-08-20 17:08:02 +00:00
|
|
|
++ lib.optional (pythonOlder "3.5") typing
|
|
|
|
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# No tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python datetimes made easy";
|
|
|
|
homepage = "https://github.com/sdispater/pendulum";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|