Files
nixpkgs/pkgs/development/python-modules/libvirt-python/default.nix
2026-09-01 10:31:15 +00:00

49 lines
923 B
Nix

{
stdenv,
lib,
buildPythonPackage,
fetchFromGitLab,
setuptools,
pkg-config,
lxml,
libvirt,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "libvirt-python";
version = "12.7.0";
pyproject = true;
src = fetchFromGitLab {
owner = "libvirt";
repo = "libvirt-python";
tag = "v${version}";
hash = "sha256-i26Ve2MZITOlrlVcykyI74K7ACKJr0bXloG88x6yZgA=";
};
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 ];
};
}