From b167e571d9bc337fbeded816f0c9105678ab7f6c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 16 May 2024 09:22:05 +0200 Subject: [PATCH 1/2] python312Packages.localzone: refactor - switch to pytestCheckHook - add pythonImportsCheck - add changelog to meta --- .../python-modules/localzone/default.nix | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/localzone/default.nix b/pkgs/development/python-modules/localzone/default.nix index 84c5acd27690..2d7c2c29caa9 100644 --- a/pkgs/development/python-modules/localzone/default.nix +++ b/pkgs/development/python-modules/localzone/default.nix @@ -2,33 +2,45 @@ , buildPythonPackage , fetchFromGitHub , dnspython -, sphinx -, pytest +, pytestCheckHook +, setuptools +, pythonOlder }: buildPythonPackage rec { pname = "localzone"; version = "0.9.8"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "ags-slc"; - repo = pname; - rev = "v${version}"; - sha256 = "1cbiv21yryjqy46av9hbjccks95sxznrx8nypd3yzihf1vkjiq5a"; + repo = "localzone"; + rev = "refs/tags/v${version}"; + hash = "sha256-quAo5w4Oxu9Hu96inu3vuiQ9GZMLpq0M8Vj67IPYcbE="; }; - propagatedBuildInputs = [ dnspython sphinx ]; + build-system = [ + setuptools + ]; - nativeCheckInputs = [ pytest ]; + dependencies = [ + dnspython + ]; - checkPhase = '' - pytest - ''; + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "localzone" + ]; meta = with lib; { description = "A simple DNS library for managing zone files"; homepage = "https://localzone.iomaestro.com"; + changelog = "https://github.com/ags-slc/localzone/blob/v${version}/CHANGELOG.rst"; license = licenses.bsd3; maintainers = with maintainers; [ flyfloh ]; }; From e43d3eb92f7078508d1c10ef5bbfa81085490ffd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 16 May 2024 09:22:48 +0200 Subject: [PATCH 2/2] python312Packages.localzone: format with nixfmt --- .../python-modules/localzone/default.nix | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/localzone/default.nix b/pkgs/development/python-modules/localzone/default.nix index 2d7c2c29caa9..02319312ce22 100644 --- a/pkgs/development/python-modules/localzone/default.nix +++ b/pkgs/development/python-modules/localzone/default.nix @@ -1,10 +1,11 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, dnspython -, pytestCheckHook -, setuptools -, pythonOlder +{ + lib, + buildPythonPackage, + fetchFromGitHub, + dnspython, + pytestCheckHook, + setuptools, + pythonOlder, }: buildPythonPackage rec { @@ -21,21 +22,13 @@ buildPythonPackage rec { hash = "sha256-quAo5w4Oxu9Hu96inu3vuiQ9GZMLpq0M8Vj67IPYcbE="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; - dependencies = [ - dnspython - ]; + dependencies = [ dnspython ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ - "localzone" - ]; + pythonImportsCheck = [ "localzone" ]; meta = with lib; { description = "A simple DNS library for managing zone files";