nixpkgs/pkgs/development/python-modules/libvirt/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

48 lines
916 B
Nix

{
stdenv,
lib,
buildPythonPackage,
fetchFromGitLab,
setuptools,
pkg-config,
lxml,
libvirt,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "libvirt";
version = "11.7.0";
pyproject = true;
src = fetchFromGitLab {
owner = "libvirt";
repo = "libvirt-python";
tag = "v${version}";
hash = "sha256-1YyWGwotk1Zv0zsNDGmWXhIFYEEN5qgYrB0j2QDTZFY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'pkg-config' "${stdenv.cc.targetPrefix}pkg-config"
'';
build-system = [ setuptools ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libvirt
lxml
];
pythonImportsCheck = [ "libvirt" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
homepage = "https://libvirt.org/python.html";
description = "Libvirt Python bindings";
license = lib.licenses.lgpl2;
maintainers = [ lib.maintainers.fpletz ];
};
}