nixpkgs/pkgs/development/python-modules/maya/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, dateparser
2024-03-21 07:27:00 +00:00
, fetchFromGitHub
, freezegun
, humanize
, pendulum
2024-03-21 07:27:00 +00:00
, pytest-mock
, pytestCheckHook
2024-03-21 07:27:00 +00:00
, pythonOlder
, pytz
, setuptools
, snaptime
, tzlocal
}:
2018-01-20 10:49:57 +00:00
buildPythonPackage rec {
pname = "maya";
2023-09-15 12:06:28 +00:00
version = "0.6.1";
2024-03-21 07:27:00 +00:00
pyproject = true;
disabled = pythonOlder "3.7";
2018-01-20 10:49:57 +00:00
src = fetchFromGitHub {
2024-03-21 07:27:00 +00:00
owner = "timofurrer";
repo = "maya";
rev = "refs/tags/v${version}";
hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY=";
2018-01-20 10:49:57 +00:00
};
postPatch = ''
# function was made private in humanize
substituteInPlace maya/core.py \
2024-03-21 07:27:00 +00:00
--replace-fail "humanize.time.abs_timedelta" "humanize.time._abs_timedelta"
'';
nativeBuildInputs = [
setuptools
2018-01-20 10:49:57 +00:00
];
propagatedBuildInputs = [
dateparser
humanize
pendulum
pytz
snaptime
tzlocal
];
2018-01-20 10:49:57 +00:00
nativeCheckInputs = [
freezegun
2024-03-21 07:27:00 +00:00
pytest-mock
pytestCheckHook
];
2018-01-20 10:49:57 +00:00
2024-03-21 07:27:00 +00:00
pythonImportsCheck = [
"maya"
];
disabledTests = [
# https://github.com/timofurrer/maya/issues/202
"test_parse_iso8601"
];
meta = with lib; {
2018-01-20 10:49:57 +00:00
description = "Datetimes for Humans";
2024-03-21 07:27:00 +00:00
homepage = "https://github.com/timofurrer/maya";
changelog = "https://github.com/timofurrer/maya/releases/tag/v${version}";
2018-01-20 10:49:57 +00:00
license = licenses.mit;
2024-03-21 07:27:00 +00:00
maintainers = with maintainers; [ ];
2018-01-20 10:49:57 +00:00
};
}