From eb5f43ae41f2f3602d7709cc838bc60702a0d777 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 22 Nov 2025 23:03:06 +0100 Subject: [PATCH] python313Packages.async-dns: modernize --- .../python-modules/async-dns/default.nix | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/async-dns/default.nix b/pkgs/development/python-modules/async-dns/default.nix index cbc8f15ed210..1df1b5b39976 100644 --- a/pkgs/development/python-modules/async-dns/default.nix +++ b/pkgs/development/python-modules/async-dns/default.nix @@ -4,29 +4,35 @@ fetchFromGitHub, poetry-core, python, - pythonOlder, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { pname = "async-dns"; version = "2.0.0"; - disabled = pythonOlder "3.6"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "gera2ld"; repo = "async_dns"; - rev = "v${version}"; - sha256 = "0vn7hxvpzikd7q61a27fwzal4lwsra2063awyr6fjpy6lh3cjdwf"; + tag = "v${version}"; + hash = "sha256-jjfJBqTGX+lM9lwNA4TKmlNC1efuCBUMPm3Gf3eHx24="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; + + nativeCheckInputs = [ + writableTmpDirAsHomeHook + ]; checkPhase = '' - export HOME=$TMPDIR + runHook preCheck + # Test needs network access rm -r tests/resolver ${python.interpreter} -m unittest + + runHook postCheck ''; pythonImportsCheck = [ "async_dns" ]; @@ -34,7 +40,8 @@ buildPythonPackage rec { meta = with lib; { description = "Python DNS library"; homepage = "https://github.com/gera2ld/async_dns"; - license = with licenses; [ mit ]; + changelog = "https://github.com/gera2ld/async_dns/releases/tag/${src.tag}"; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; }