python3Packages.guestfs: build and use from pkgs.libguestfs
Co-authored-by: Robert Schütz <github@dotlambda.de>
This commit is contained in:
co-authored by
Robert Schütz
parent
9422633af4
commit
dc50b96e8a
@@ -35,6 +35,7 @@
|
||||
jansson,
|
||||
getopt,
|
||||
perlPackages,
|
||||
python3,
|
||||
ocamlPackages,
|
||||
libtirpc,
|
||||
appliance ? null,
|
||||
@@ -67,6 +68,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
gperf
|
||||
makeWrapper
|
||||
pkg-config
|
||||
python3
|
||||
python3.pkgs.pycodestyle
|
||||
qemu
|
||||
zstd
|
||||
]
|
||||
@@ -103,6 +106,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
numactl
|
||||
libapparmor
|
||||
perlPackages.ModuleBuild
|
||||
python3
|
||||
libtirpc
|
||||
zstd
|
||||
ocamlPackages.ocamlbuild
|
||||
@@ -120,6 +124,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--enable-install-daemon"
|
||||
"--disable-appliance"
|
||||
"--with-distro=NixOS"
|
||||
"--with-python-installdir=${placeholder "out"}/${python3.sitePackages}"
|
||||
"--with-readline"
|
||||
"CPPFLAGS=-I${lib.getDev libxml2}/include/libxml2"
|
||||
"INSTALL_OCAMLLIB=${placeholder "out"}/lib/ocaml"
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pythonAtLeast,
|
||||
buildPythonPackage,
|
||||
fetchurl,
|
||||
libguestfs,
|
||||
qemu,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "guestfs";
|
||||
version = "1.40.2";
|
||||
format = "setuptools";
|
||||
|
||||
# FIXME: "error: implicit declaration of function 'PyEval_ThreadsInitialized'"
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2343777
|
||||
disabled = pythonAtLeast "3.13";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.libguestfs.org/python/guestfs-${version}.tar.gz";
|
||||
hash = "sha256-GCKwkhrIXPz0hPrwe3YrhlEr6TuDYQivDzpMlZ+CAzI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
libguestfs
|
||||
qemu
|
||||
];
|
||||
|
||||
# no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "guestfs" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://libguestfs.org/guestfs-python.3.html";
|
||||
description = "Use libguestfs from Python";
|
||||
license = licenses.lgpl2Plus;
|
||||
maintainers = with maintainers; [ grahamc ];
|
||||
inherit (libguestfs.meta) platforms;
|
||||
};
|
||||
}
|
||||
@@ -6228,7 +6228,11 @@ self: super: with self; {
|
||||
|
||||
guessit = callPackage ../development/python-modules/guessit { };
|
||||
|
||||
guestfs = callPackage ../development/python-modules/guestfs { qemu = pkgs.qemu; };
|
||||
guestfs = toPythonModule (
|
||||
pkgs.libguestfs.override {
|
||||
python3 = python;
|
||||
}
|
||||
);
|
||||
|
||||
guidance = callPackage ../development/python-modules/guidance { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user