depot/third_party/nixpkgs/pkgs/development/python-modules/pendulum/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

36 lines
783 B
Nix

{ lib, fetchPypi, buildPythonPackage, pythonOlder
, python-dateutil
, importlib-metadata
, poetry-core
, pytzdata
, typing
}:
buildPythonPackage rec {
pname = "pendulum";
version = "2.1.2";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207";
};
preBuild = ''
export HOME=$TMPDIR
'';
build-system = [ poetry-core ];
dependencies = [ python-dateutil pytzdata ]
++ lib.optional (pythonOlder "3.5") typing
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
# No tests
doCheck = false;
meta = with lib; {
description = "Python datetimes made easy";
homepage = "https://github.com/sdispater/pendulum";
license = licenses.mit;
};
}