From e74f61f30d5b5c72b6bce01051e4aa77c8d73ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teo=20Klestrup=20R=C3=B6ijezon?= Date: Tue, 9 Jan 2018 11:28:45 +0100 Subject: [PATCH 1/2] libguestfs: Added JDK dependency This is required with the current set of configure flags --- pkgs/development/libraries/libguestfs/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index bfdd0cf8fd74d..deb3dc9d06a73 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -2,7 +2,7 @@ , 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, numactl, xen, libapparmor -, getopt, perlPackages, ocamlPackages }: +, getopt, perlPackages, ocamlPackages, jdk }: stdenv.mkDerivation rec { name = "libguestfs-${version}"; @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong SysVirt numactl xen libapparmor getopt perlPackages.ModuleBuild + jdk ] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ]); prePatch = '' From 440cfd3e420c232a30ccefa7ccf210c8e60fa5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teo=20Klestrup=20R=C3=B6ijezon?= Date: Tue, 9 Jan 2018 14:36:37 +0100 Subject: [PATCH 2/2] libguestfs: Made Java dependency optional --- pkgs/development/libraries/libguestfs/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index deb3dc9d06a73..e659b31d97450 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -2,7 +2,10 @@ , 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, numactl, xen, libapparmor -, getopt, perlPackages, ocamlPackages, jdk }: +, getopt, perlPackages, ocamlPackages +, javaSupport ? false, jdk ? null }: + +assert javaSupport -> jdk != null; stdenv.mkDerivation rec { name = "libguestfs-${version}"; @@ -24,8 +27,8 @@ stdenv.mkDerivation rec { cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong SysVirt numactl xen libapparmor getopt perlPackages.ModuleBuild - jdk - ] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ]); + ] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ]) + ++ stdenv.lib.optional javaSupport jdk; prePatch = '' # build-time scripts @@ -41,7 +44,8 @@ stdenv.mkDerivation rec { # some scripts hardcore /usr/bin/env which is not available in the build env patchShebangs . ''; - configureFlags = "--disable-appliance --disable-daemon"; + configureFlags = [ "--disable-appliance" "--disable-daemon" ] + ++ stdenv.lib.optionals (!javaSupport) [ "--disable-java" "--without-java" ]; patches = [ ./libguestfs-syms.patch ]; NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2/"; installFlags = "REALLY_INSTALL=yes";