Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pendulum / default.nix
blobcdc7ab035ed320b7f9d56a7a00f3958b16df4cc0
1 { lib, fetchPypi, buildPythonPackage, pythonOlder
2 , python-dateutil
3 , importlib-metadata
4 , poetry-core
5 , pytzdata
6 , typing
7 }:
9 buildPythonPackage rec {
10   pname = "pendulum";
11   version = "2.1.2";
12   format = "pyproject";
14   src = fetchPypi {
15     inherit pname version;
16     sha256 = "b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207";
17   };
19   preBuild = ''
20     export HOME=$TMPDIR
21   '';
23   nativeBuildInputs = [ poetry-core ];
24   propagatedBuildInputs = [ python-dateutil pytzdata ]
25   ++ lib.optional (pythonOlder "3.5") typing
26   ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
28   # No tests
29   doCheck = false;
31   meta = with lib; {
32     description = "Python datetimes made easy";
33     homepage = "https://github.com/sdispater/pendulum";
34     license = licenses.mit;
35   };