diff --git a/pkgs/development/python-modules/tzlocal/default.nix b/pkgs/development/python-modules/tzlocal/default.nix index c02cf030eccf..fdd7bd269bce 100644 --- a/pkgs/development/python-modules/tzlocal/default.nix +++ b/pkgs/development/python-modules/tzlocal/default.nix @@ -2,44 +2,41 @@ lib, stdenv, buildPythonPackage, - fetchPypi, + fetchFromGitHub, setuptools, pytest-mock, pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "tzlocal"; - version = "5.3.1"; # version needs to be compatible with APScheduler - + version = "5.4.4"; # version needs to be compatible with APScheduler pyproject = true; + __structuredAttrs = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-zO/8ft7O/qH1lVQdvW6ZDLHqPRm/AbKAnzYqA915If0="; + src = fetchFromGitHub { + owner = "regebro"; + repo = "tzlocal"; + tag = finalAttrs.version; + hash = "sha256-kZ3+YpmJJ7ZHKbEp5RELVnGtwAOJph19Wf32lwuokNM="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; nativeCheckInputs = [ pytest-mock pytestCheckHook ]; - disabledTests = [ - "test_conflicting" - "test_noconflict" - "test_symlink_localtime" - ] - ++ lib.optional stdenv.hostPlatform.isDarwin "test_assert_tz_offset"; + disabledTests = lib.optional stdenv.hostPlatform.isDarwin "test_assert_tz_offset"; pythonImportsCheck = [ "tzlocal" ]; meta = { description = "Tzinfo object for the local timezone"; homepage = "https://github.com/regebro/tzlocal"; - changelog = "https://github.com/regebro/tzlocal/blob/${version}/CHANGES.txt"; + changelog = "https://github.com/regebro/tzlocal/blob/${finalAttrs.src.tag}/CHANGES.txt"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ dotlambda ]; }; -} +})