python3Packages.guestfs: build and use from pkgs.libguestfs (#385635)

authored by philiptaron.tngl.sh and committed by GitHub 8988e1af 8b1e1e1e

+10 -41
+5
pkgs/by-name/li/libguestfs/package.nix
··· 35 35 jansson, 36 36 getopt, 37 37 perlPackages, 38 + python3, 38 39 ocamlPackages, 39 40 libtirpc, 40 41 appliance ? null, ··· 67 68 gperf 68 69 makeWrapper 69 70 pkg-config 71 + python3 72 + python3.pkgs.pycodestyle 70 73 qemu 71 74 zstd 72 75 ] ··· 103 106 numactl 104 107 libapparmor 105 108 perlPackages.ModuleBuild 109 + python3 106 110 libtirpc 107 111 zstd 108 112 ocamlPackages.ocamlbuild ··· 120 124 "--enable-install-daemon" 121 125 "--disable-appliance" 122 126 "--with-distro=NixOS" 127 + "--with-python-installdir=${placeholder "out"}/${python3.sitePackages}" 123 128 "--with-readline" 124 129 "CPPFLAGS=-I${lib.getDev libxml2}/include/libxml2" 125 130 "INSTALL_OCAMLLIB=${placeholder "out"}/lib/ocaml"
-40
pkgs/development/python-modules/guestfs/default.nix
··· 1 - { 2 - lib, 3 - pythonAtLeast, 4 - buildPythonPackage, 5 - fetchurl, 6 - libguestfs, 7 - qemu, 8 - }: 9 - 10 - buildPythonPackage rec { 11 - pname = "guestfs"; 12 - version = "1.40.2"; 13 - format = "setuptools"; 14 - 15 - # FIXME: "error: implicit declaration of function 'PyEval_ThreadsInitialized'" 16 - # https://bugzilla.redhat.com/show_bug.cgi?id=2343777 17 - disabled = pythonAtLeast "3.13"; 18 - 19 - src = fetchurl { 20 - url = "http://download.libguestfs.org/python/guestfs-${version}.tar.gz"; 21 - hash = "sha256-GCKwkhrIXPz0hPrwe3YrhlEr6TuDYQivDzpMlZ+CAzI="; 22 - }; 23 - 24 - propagatedBuildInputs = [ 25 - libguestfs 26 - qemu 27 - ]; 28 - 29 - # no tests 30 - doCheck = false; 31 - pythonImportsCheck = [ "guestfs" ]; 32 - 33 - meta = with lib; { 34 - homepage = "https://libguestfs.org/guestfs-python.3.html"; 35 - description = "Use libguestfs from Python"; 36 - license = licenses.lgpl2Plus; 37 - maintainers = with maintainers; [ grahamc ]; 38 - inherit (libguestfs.meta) platforms; 39 - }; 40 - }
+5 -1
pkgs/top-level/python-packages.nix
··· 6228 6228 6229 6229 guessit = callPackage ../development/python-modules/guessit { }; 6230 6230 6231 - guestfs = callPackage ../development/python-modules/guestfs { qemu = pkgs.qemu; }; 6231 + guestfs = toPythonModule ( 6232 + pkgs.libguestfs.override { 6233 + python3 = python; 6234 + } 6235 + ); 6232 6236 6233 6237 guidance = callPackage ../development/python-modules/guidance { }; 6234 6238