diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-11-09 16:09:51 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-11-09 16:09:51 +0100 |
commit | 3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b (patch) | |
tree | c11070755de4040d027b42c4855139c7de678d53 | |
parent | 6d0518fbdf4492a4c878ed0d85eda3d921a16eaf (diff) | |
parent | 25b2d2d9b040814f1a1ac3daa7d0493178eab2d0 (diff) | |
download | nixlib-3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b.tar nixlib-3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b.tar.gz nixlib-3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b.tar.bz2 nixlib-3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b.tar.lz nixlib-3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b.tar.xz nixlib-3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b.tar.zst nixlib-3d2f1c3385e0c6b101f052eadc34f8c7cdb4cb0b.zip |
Merge pull request #4854 from offlinehacker/pkgs/libguestfs/add
Add augex, hivex and libguestfs
-rw-r--r-- | pkgs/development/libraries/hivex/default.nix | 37 | ||||
-rw-r--r-- | pkgs/development/libraries/hivex/hivex-syms.patch | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/libguestfs/default.nix | 55 | ||||
-rw-r--r-- | pkgs/development/libraries/libguestfs/libguestfs-syms.patch | 13 | ||||
-rw-r--r-- | pkgs/tools/system/augeas/default.nix | 21 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 10 | ||||
-rw-r--r-- | pkgs/top-level/perl-packages.nix | 13 |
7 files changed, 162 insertions, 0 deletions
diff --git a/pkgs/development/libraries/hivex/default.nix b/pkgs/development/libraries/hivex/default.nix new file mode 100644 index 000000000000..4f0b3826022f --- /dev/null +++ b/pkgs/development/libraries/hivex/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, pkgconfig, automake, autoconf, libtool, makeWrapper +, perl, libxml2, IOStringy }: + +stdenv.mkDerivation rec { + name = "hivex-${version}"; + version = "1.3.11"; + + src = fetchurl { + url = "http://libguestfs.org/download/hivex/${name}.tar.gz"; + sha256 = "0y3nqykwy58divxkv7gmsb067dasyfz3apbp437hl57rgrndyfn6"; + }; + + patches = [ ./hivex-syms.patch ]; + + buildInputs = [ + pkgconfig automake autoconf libtool makeWrapper + perl libxml2 IOStringy + ]; + + preConfigure = '' + AUTOPOINT=true autoreconf --verbose --install + ''; + + postInstall = '' + for bin in $out/bin/*; do + wrapProgram "$bin" --prefix "PATH" : "$out/bin" + done + ''; + + meta = with stdenv.lib; { + description = "Windows registry hive extraction library"; + license = licenses.lgpl2; + homepage = https://github.com/libguestfs/hivex; + maintainers = with maintainers; [offline]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/development/libraries/hivex/hivex-syms.patch b/pkgs/development/libraries/hivex/hivex-syms.patch new file mode 100644 index 000000000000..2280ade59a62 --- /dev/null +++ b/pkgs/development/libraries/hivex/hivex-syms.patch @@ -0,0 +1,13 @@ +diff -rupN hivex-1.3.11/lib/Makefile.am hivex-1.3.11-new/lib/Makefile.am +--- hivex-1.3.11/lib/Makefile.am 2013-09-10 13:04:12.000000000 +0200 ++++ hivex-1.3.11-new/lib/Makefile.am 2014-11-06 01:31:05.956106861 +0100 +@@ -40,8 +40,7 @@ libhivex_la_SOURCES = \ + + libhivex_la_LIBADD = ../gnulib/lib/libgnu.la $(LTLIBOBJS) + libhivex_la_LDFLAGS = \ +- -version-info 0:0:0 \ +- $(VERSION_SCRIPT_FLAGS)$(srcdir)/hivex.syms \ ++ -version-info 0:0:0 + $(LTLIBICONV) \ + $(LTLIBINTL) \ + $(LTLIBTHREAD) diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix new file mode 100644 index 000000000000..27e1c6adc008 --- /dev/null +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchurl, pkgconfig, autoconf, automake, libtool, makeWrapper +, ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2 +, acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex +, gmp, readline, file, libintlperl, GetoptLong, SysVirt }: + +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 = [ + makeWrapper pkgconfig autoconf automake libtool ncurses cpio gperf perl + cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig + systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong + SysVirt + ]; + + configureFlags = "--disable-appliance --disable-daemon"; + patches = [ ./libguestfs-syms.patch ]; + NIX_CFLAGS_COMPILE="-I${libxml2}/include/libxml2/"; + + preConfigure = '' + AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install + ''; + + 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]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/development/libraries/libguestfs/libguestfs-syms.patch b/pkgs/development/libraries/libguestfs/libguestfs-syms.patch new file mode 100644 index 000000000000..44cdc4e69b2e --- /dev/null +++ b/pkgs/development/libraries/libguestfs/libguestfs-syms.patch @@ -0,0 +1,13 @@ +diff -rupN libguestfs-1.29.5/src/Makefile.am libguestfs-1.29.5-new/src/Makefile.am +--- libguestfs-1.29.5/src/Makefile.am 2014-11-05 16:43:08.000000000 +0100 ++++ libguestfs-1.29.5-new/src/Makefile.am 2014-11-05 20:07:45.760730596 +0100 +@@ -167,8 +167,7 @@ libguestfs_la_LIBADD = \ + # Force libtool to name the library 'libguestfs.so.0.$(MAX_PROC_NR).0'. + # Include the version script to limit which symbols are exported. + libguestfs_la_LDFLAGS = \ +- -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) \ +- $(VERSION_SCRIPT_FLAGS)$(srcdir)/libguestfs.syms ++ -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) + + if HAVE_FUSE + # XXX Unfortunately FUSE_CFLAGS defines _FILE_OFFSET_BITS=64. diff --git a/pkgs/tools/system/augeas/default.nix b/pkgs/tools/system/augeas/default.nix new file mode 100644 index 000000000000..e6b09932f867 --- /dev/null +++ b/pkgs/tools/system/augeas/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, pkgconfig, readline, libxml2 }: + +stdenv.mkDerivation rec { + name = "augeas-${version}"; + version = "1.2.0"; + + src = fetchurl { + url = "http://download.augeas.net/${name}.tar.gz"; + sha256 = "1q41yilxc0nvjz5h9phm38k2b73k2v0b9jg11y92228bps7b5bpl"; + }; + + buildInputs = [ pkgconfig readline libxml2 ]; + + meta = with stdenv.lib; { + description = "Configuration editing tool."; + license = licenses.lgpl2; + homepage = http://augeas.net/; + maintainers = with maintainers; [offline]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a08593c561ae..c4067b63e85c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4283,6 +4283,8 @@ let ### DEVELOPMENT / TOOLS + augeas = callPackage ../tools/system/augeas { }; + ansible = callPackage ../tools/system/ansible { }; antlr = callPackage ../development/tools/parsing/antlr/2.7.7.nix { }; @@ -5474,6 +5476,10 @@ let libusb = libusb1; }; + hivex = callPackage ../development/libraries/hivex { + inherit (perlPackages) IOStringy; + }; + hspell = callPackage ../development/libraries/hspell { }; hspellDicts = callPackage ../development/libraries/hspell/dicts.nix { }; @@ -5825,6 +5831,10 @@ let libgsystem = callPackage ../development/libraries/libgsystem { }; + libguestfs = callPackage ../development/libraries/libguestfs { + inherit (perlPackages) libintlperl GetoptLong SysVirt; + }; + libharu = callPackage ../development/libraries/libharu { }; libHX = callPackage ../development/libraries/libHX { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 5fa7fddfabe6..8b0ee4cfa5b5 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -8305,6 +8305,19 @@ let self = _self // overrides; _self = with self; { }; }; + SysVirt = buildPerlPackage rec { + name = "Sys-Virt-1.2.9"; + src = fetchurl { + url = "mirror://cpan/authors/id/D/DA/DANBERR/${name}.tar.gz"; + sha256 = "1ag55mlkbf63iq3q5mxdawf29c2nyphd52kbshnlim3lax247ml7"; + }; + propagatedBuildInputs = [XMLXPath]; + buildInputs = [TestPodCoverage TimeHiRes TestPod pkgs.pkgconfig pkgs.libvirt]; + meta = { + platforms = stdenv.lib.platforms.linux; + }; + }; + TAPParserSourceHandlerpgTAP = buildPerlModule { name = "TAP-Parser-SourceHandler-pgTAP-3.30"; src = fetchurl { |