2018-06-29 17:50:14 +00:00
|
|
|
{ lib, fetchPypi, buildPythonPackage, pythonOlder
|
2020-08-11 19:13:58 +00:00
|
|
|
, dateutil
|
|
|
|
, importlib-metadata
|
|
|
|
, poetry
|
2020-08-11 18:41:52 +00:00
|
|
|
, poetry-core
|
2020-08-11 19:13:58 +00:00
|
|
|
, pytzdata
|
|
|
|
, typing
|
2020-08-11 18:41:52 +00:00
|
|
|
}:
|
2018-01-20 10:50:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pendulum";
|
2020-07-31 08:56:42 +00:00
|
|
|
version = "2.1.2";
|
2020-08-11 18:41:52 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2018-01-20 10:50:45 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-31 08:56:42 +00:00
|
|
|
sha256 = "b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207";
|
2018-01-20 10:50:45 +00:00
|
|
|
};
|
|
|
|
|
2020-08-11 19:13:58 +00:00
|
|
|
preBuild = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
propagatedBuildInputs = [ dateutil pytzdata ]
|
|
|
|
++ lib.optional (pythonOlder "3.5") typing
|
|
|
|
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2018-01-20 10:50:45 +00:00
|
|
|
|
|
|
|
# No tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-06-29 17:50:14 +00:00
|
|
|
meta = with lib; {
|
2018-01-20 10:50:45 +00:00
|
|
|
description = "Python datetimes made easy";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/sdispater/pendulum";
|
2018-01-20 10:50:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|