2016-01-17 23:04:40 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, autoreconfHook, makeWrapper
|
2014-11-06 10:32:59 +00:00
|
|
|
, ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2
|
|
|
|
, acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex
|
2015-12-24 23:16:59 +00:00
|
|
|
, gmp, readline, file, libintlperl, GetoptLong, SysVirt, numactl, xen }:
|
2014-11-06 10:32:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libguestfs-${version}";
|
|
|
|
version = "1.29.5";
|
|
|
|
|
|
|
|
appliance = fetchurl {
|
|
|
|
url = "http://libguestfs.org/download/binaries/appliance/appliance-1.26.0.tar.xz";
|
|
|
|
sha256 = "1kzvgmy845kclvr93y6rdpss2q0p8yfqg14r0i1pi5r4zc68yvj4";
|
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://libguestfs.org/download/1.29-development/libguestfs-${version}.tar.gz";
|
|
|
|
sha256 = "1il0p3irwcyfdm83935hj4bvxsx0kdfn8dvqmg2lbzap17jvzj8h";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2016-01-17 23:04:40 +00:00
|
|
|
makeWrapper pkgconfig autoreconfHook ncurses cpio gperf perl
|
2014-11-06 10:32:59 +00:00
|
|
|
cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig
|
|
|
|
systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong
|
2015-12-24 23:16:59 +00:00
|
|
|
SysVirt numactl xen
|
2014-11-06 10:32:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = "--disable-appliance --disable-daemon";
|
|
|
|
patches = [ ./libguestfs-syms.patch ];
|
|
|
|
NIX_CFLAGS_COMPILE="-I${libxml2}/include/libxml2/";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for bin in $out/bin/*; do
|
|
|
|
wrapProgram "$bin" \
|
|
|
|
--prefix "PATH" : "$out/bin:${hivex}/bin" \
|
|
|
|
--prefix "PERL5LIB" : "$PERL5LIB:$out/lib/perl5/site_perl"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
mkdir -p "$out/lib/guestfs"
|
|
|
|
tar -Jxvf "$appliance" --strip 1 -C "$out/lib/guestfs"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Tools for accessing and modifying virtual machine disk images";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
homepage = http://libguestfs.org/;
|
|
|
|
maintainers = with maintainers; [offline];
|
2015-11-17 20:29:29 +00:00
|
|
|
platforms = platforms.linux;
|
2015-03-23 12:25:20 +00:00
|
|
|
hydraPlatforms = [];
|
2014-11-06 10:32:59 +00:00
|
|
|
};
|
|
|
|
}
|