Files
nixpkgs/pkgs/development/python-modules/python-hosts/default.nix
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

49 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pytestCheckHook,
pyyaml,
setuptools,
}:
buildPythonPackage rec {
pname = "python-hosts";
version = "1.1.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-XiU6aO6EhFVgj1g7TYMdbgg7IvjkU2DFoiwYikrB13A=";
};
build-system = [ setuptools ];
nativeCheckInputs = [
pyyaml
pytestCheckHook
];
pythonImportsCheck = [ "python_hosts" ];
disabledTests = [
# Tests require network access
"test_import_from_url_counters_for_part_success"
"test_import_from_url_with_force"
"test_import_from_url_without_force"
"test_import_from_url"
];
meta = {
description = "Library for managing a hosts file";
longDescription = ''
python-hosts is a Python library for managing a hosts file. It enables you to add
and remove entries, or import them from a file or URL.
'';
homepage = "https://github.com/jonhadfield/python-hosts";
changelog = "https://github.com/jonhadfield/python-hosts/blob/${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ psyanticy ];
};
}