diff --git a/pkgs/development/python-modules/dateparser/default.nix b/pkgs/development/python-modules/dateparser/default.nix index 79a45bdb3575..ca9e2f823748 100644 --- a/pkgs/development/python-modules/dateparser/default.nix +++ b/pkgs/development/python-modules/dateparser/default.nix @@ -14,12 +14,14 @@ , parameterized , pytestCheckHook , GitPython +, parsel +, requests , ruamel-yaml }: buildPythonPackage rec { pname = "dateparser"; - version = "1.1.1"; + version = "1.1.3"; disabled = !isPy3k; @@ -27,16 +29,11 @@ buildPythonPackage rec { owner = "scrapinghub"; repo = "dateparser"; rev = "v${version}"; - sha256 = "sha256-bDup3q93Zq+pvwsy/lQy2byOMjG6C/+7813hWQMbZRU="; + sha256 = "sha256-2bZaaaLT3hocIiqLZpudP6gmiYwxPNMrjG9dYF3GvTc="; }; patches = [ ./regex-compat.patch - (fetchpatch { - name = "tests-31st.patch"; - url = "https://github.com/scrapinghub/dateparser/commit/b132381b9c15e560a0be5183c7d96180119a7b4f.diff"; - sha256 = "nQUWtfku5sxx/C45KJnfwvDXiccXGeVM+cQDKX9lxbE="; - }) ]; postPatch = '' @@ -46,18 +43,26 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ - # install_requires - python-dateutil pytz regex tzlocal - # extra_requires - hijri-converter convertdate fasttext langdetect + python-dateutil + pytz + regex + tzlocal ]; + passthru.optional-dependencies = { + calendars = [ hijri-converter convertdate ]; + fasttext = [ fasttext ]; + langdetect = [ langdetect ]; + }; + checkInputs = [ parameterized pytestCheckHook GitPython + parsel + requests ruamel-yaml - ]; + ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); preCheck = '' export HOME="$TEMPDIR"