From 023d57eae762316bc25a6939696da9c5cc500fd5 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 4 Oct 2022 19:18:52 +0100 Subject: [PATCH] guestfs-tools: init at 1.48.2 --- .../virtualization/guestfs-tools/default.nix | 87 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 89 insertions(+) create mode 100644 pkgs/tools/virtualization/guestfs-tools/default.nix diff --git a/pkgs/tools/virtualization/guestfs-tools/default.nix b/pkgs/tools/virtualization/guestfs-tools/default.nix new file mode 100644 index 000000000000..8025ccd6db70 --- /dev/null +++ b/pkgs/tools/virtualization/guestfs-tools/default.nix @@ -0,0 +1,87 @@ +{ lib +, stdenv +, fetchurl +, bison +, cdrkit +, cpio +, flex +, getopt +, hivex +, jansson +, libguestfs +, libvirt +, libxml2 +, makeWrapper +, ncurses +, ocamlPackages +, pcre2 +, perlPackages +, pkg-config +, qemu +, xz +}: + +stdenv.mkDerivation rec { + pname = "guestfs-tools"; + version = "1.48.2"; + + src = fetchurl { + url = "https://download.libguestfs.org/guestfs-tools/${lib.versions.majorMinor version}-stable/guestfs-tools-${version}.tar.gz"; + sha256 = "sha256-G9l5sG5g5kMlSXzg0GX8+Et7M9/k2dRLMBgsMI4MaxA="; + }; + + nativeBuildInputs = [ + bison + cdrkit + cpio + flex + getopt + makeWrapper + pkg-config + qemu + ] ++ + (with perlPackages; [ + GetoptLong + libintl-perl + ModuleBuild + perl + Po4a + ]) ++ + (with ocamlPackages; [ + findlib + gettext-stub + ocaml + ocaml_gettext + ounit2 + ]); + + buildInputs = [ + hivex + jansson + libguestfs + libvirt + libxml2 + ncurses + pcre2 + xz + ]; + + enableParallelBuilding = true; + + preBuild = '' + patchShebangs . + ''; + + postInstall = '' + wrapProgram $out/bin/virt-win-reg \ + --prefix PERL5LIB : ${with perlPackages; makeFullPerlPath [ hivex libintl-perl libguestfs ]} + ''; + + meta = with lib; { + description = "Extra tools for accessing and modifying virtual machine disk images"; + license = with licenses; [ gpl2Plus lgpl21Plus ]; + homepage = "https://libguestfs.org/"; + maintainers = with maintainers; [ thiagokokada ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0cc34e2a7f4f..9fc185fea20d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1317,6 +1317,8 @@ with pkgs; godspeed = callPackage ../tools/networking/godspeed { }; + guestfs-tools = callPackage ../tools/virtualization/guestfs-tools { }; + fwbuilder = libsForQt5.callPackage ../tools/security/fwbuilder { }; headsetcontrol = callPackage ../tools/audio/headsetcontrol { };