File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
pkgs/by-name/li/libguestfs Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change 55 pkg-config ,
66 autoreconfHook ,
77 makeWrapper ,
8+ removeReferencesTo ,
89 libxcrypt ,
910 ncurses ,
1011 cpio ,
2021 libcap ,
2122 libcap_ng ,
2223 libconfig ,
23- systemd ,
24+ systemdLibs ,
2425 fuse ,
2526 yajl ,
2627 libvirt ,
@@ -61,6 +62,7 @@ stdenv.mkDerivation rec {
6162 nativeBuildInputs =
6263 [
6364 autoreconfHook
65+ removeReferencesTo
6466 bison
6567 cdrkit
6668 cpio
@@ -94,7 +96,7 @@ stdenv.mkDerivation rec {
9496 libcap
9597 libcap_ng
9698 libconfig
97- systemd
99+ systemdLibs
98100 fuse
99101 yajl
100102 libvirt
@@ -114,6 +116,10 @@ stdenv.mkDerivation rec {
114116 gettext-stub
115117 ounit
116118 ] )
119+ ++ [
120+ ocamlPackages' . augeas
121+ ( hivex . override { ocamlPackages = ocamlPackages' ; } )
122+ ]
117123 ++ lib . optional javaSupport jdk ;
118124
119125 prePatch = ''
@@ -129,9 +135,14 @@ stdenv.mkDerivation rec {
129135 patchShebangs .
130136 '' ;
131137 configureFlags = [
138+ "--enable-daemon"
139+ "--enable-install-daemon"
132140 "--disable-appliance"
133- "--disable-daemon"
134141 "--with-distro=NixOS"
142+ "--disable-perl" # build broken since 1.53.x
143+ "--with-readline"
144+ "CPPFLAGS=-I${ lib . getDev libxml2 } /include/libxml2"
145+ "INSTALL_OCAMLLIB=${ placeholder "out" } /lib/ocaml"
135146 "--with-guestfs-path=${ placeholder "out" } /lib/guestfs"
136147 ] ++ lib . optionals ( ! javaSupport ) [ "--without-java" ] ;
137148 patches = [ ./libguestfs-syms.patch ] ;
@@ -141,7 +152,17 @@ stdenv.mkDerivation rec {
141152 installFlags = [ "REALLY_INSTALL=yes" ] ;
142153 enableParallelBuilding = true ;
143154
155+ outputs = [
156+ "out"
157+ "guestfsd"
158+ ] ;
159+
144160 postInstall = ''
161+ # move guestfsd (the component running in the appliance) to a separate output
162+ mkdir -p $guestfsd/bin
163+ mv $out/sbin/guestfsd $guestfsd/bin/guestfsd
164+ remove-references-to -t $out $guestfsd/bin/guestfsd
165+
145166 mv "$out/lib/ocaml/guestfs" "$OCAMLFIND_DESTDIR/guestfs"
146167 for bin in $out/bin/*; do
147168 wrapProgram "$bin" \
You can’t perform that action at this time.
0 commit comments