blob: 0c52334592caabe4cd4154894bd6cf51c3d4b38c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{
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 ];
};
}
|