diff --git a/pkgs/development/python-modules/pyrfc3339/default.nix b/pkgs/development/python-modules/pyrfc3339/default.nix index bf2abeb811d6..f5c37abc52ed 100644 --- a/pkgs/development/python-modules/pyrfc3339/default.nix +++ b/pkgs/development/python-modules/pyrfc3339/default.nix @@ -1,33 +1,44 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, # build-system setuptools, # dependencies pytz, + + # tests + pytestCheckHook, }: buildPythonPackage rec { pname = "pyrfc3339"; - version = "1.1"; + version = "2.0.1"; pyproject = true; - src = fetchPypi { - pname = "pyRFC3339"; - inherit version; - sha256 = "06jv7ar7lpvvk0dixzwdr3wgm0g1lipxs429s2z7knwwa7hwpf41"; + src = fetchFromGitHub { + owner = "kurtraschke"; + repo = "pyRFC3339"; + tag = "v${version}"; + hash = "sha256-iLzWm2xt7EuzqU0G+66sXTTvWTv1cf0BmTDciSL68+A="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ pytz ]; + dependencies = [ pytz ]; - doCheck = false; # tests are not including in PyPI tarball + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pyrfc3339" + ]; meta = with lib; { + changelog = "https://github.com/kurtraschke/pyRFC3339/blob/${src.tag}/CHANGES.rst"; description = "Generate and parse RFC 3339 timestamps"; homepage = "https://github.com/kurtraschke/pyRFC3339"; license = licenses.mit;