Files
nixpkgs/pkgs/development/python-modules/localzone/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

48 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
dnspython,
pytestCheckHook,
setuptools,
pythonOlder,
}:
buildPythonPackage rec {
pname = "localzone";
version = "0.9.8";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ags-slc";
repo = "localzone";
tag = "v${version}";
hash = "sha256-quAo5w4Oxu9Hu96inu3vuiQ9GZMLpq0M8Vj67IPYcbE=";
};
build-system = [ setuptools ];
dependencies = [ dnspython ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "localzone" ];
postPatch = ''
# Fix tests with dnspython 2.8.0
# https://github.com/ags-slc/localzone/pull/6
substituteInPlace tests/test_models.py \
--replace-fail 'raises((AttributeError, DNSSyntaxError))' 'raises((AttributeError, DNSSyntaxError, ValueError))'
'';
meta = {
description = "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 = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ flyfloh ];
};
}