nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 66 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 dateparser, 5 fetchFromGitHub, 6 freezegun, 7 humanize, 8 pendulum, 9 pytest-mock, 10 pytestCheckHook, 11 pytz, 12 setuptools, 13 snaptime, 14 tzlocal, 15}: 16 17buildPythonPackage rec { 18 pname = "maya"; 19 version = "0.6.1"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "timofurrer"; 24 repo = "maya"; 25 tag = "v${version}"; 26 hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY="; 27 }; 28 29 postPatch = '' 30 # function was made private in humanize 31 substituteInPlace maya/core.py \ 32 --replace-fail "humanize.time.abs_timedelta" "humanize.time._abs_timedelta" 33 ''; 34 35 nativeBuildInputs = [ setuptools ]; 36 37 propagatedBuildInputs = [ 38 dateparser 39 humanize 40 pendulum 41 pytz 42 snaptime 43 tzlocal 44 ]; 45 46 nativeCheckInputs = [ 47 freezegun 48 pytest-mock 49 pytestCheckHook 50 ]; 51 52 pythonImportsCheck = [ "maya" ]; 53 54 disabledTests = [ 55 # https://github.com/timofurrer/maya/issues/202 56 "test_parse_iso8601" 57 ]; 58 59 meta = { 60 description = "Datetimes for Humans"; 61 homepage = "https://github.com/timofurrer/maya"; 62 changelog = "https://github.com/timofurrer/maya/releases/tag/v${version}"; 63 license = lib.licenses.mit; 64 maintainers = [ ]; 65 }; 66}