git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #33642 from teozkr/libguestfs-java

Added JDK dependency to libguestfs

commit73a01aa028c4ee4ae1220b68e45d697fa86ee9c8 authorEelco Dolstra <eelco.dolstra@logicblox.com> dateTue 9 Jan 2018, 15:25 (9 years ago) parentc23b036440cfd3
1 file changed+8−3
pkgs/development/libraries/libguestfs/default.nix+8−3
pkgs/development/libraries/libguestfs/default.nix+8−3
@@ -2,7 +2,10 @@
22, ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2
33, acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex
44, gmp, readline, file, libintlperl, GetoptLong, SysVirt, numactl, xen, libapparmor
5−, getopt, perlPackages, ocamlPackages }:
5+, getopt, perlPackages, ocamlPackages
6+, javaSupport ? false, jdk ? null }:
7+
8+assert javaSupport -> jdk != null;
69
710stdenv.mkDerivation rec {
811 name = "libguestfs-${version}";
@@ -24,7 +27,8 @@ stdenv.mkDerivation rec {
2427 cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig
2528 systemd fuse yajl libvirt gmp readline file hivex libintlperl GetoptLong
2629 SysVirt numactl xen libapparmor getopt perlPackages.ModuleBuild
27− ] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ]);
30+ ] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ])
31+ ++ stdenv.lib.optional javaSupport jdk;
2832
2933 prePatch = ''
3034 # build-time scripts
@@ -40,7 +44,8 @@ stdenv.mkDerivation rec {
4044 # some scripts hardcore /usr/bin/env which is not available in the build env
4145 patchShebangs .
4246 '';
43− configureFlags = "--disable-appliance --disable-daemon";
47+ configureFlags = [ "--disable-appliance" "--disable-daemon" ]
48+ ++ stdenv.lib.optionals (!javaSupport) [ "--disable-java" "--without-java" ];
4449 patches = [ ./libguestfs-syms.patch ];
4550 NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2/";
4651 installFlags = "REALLY_INSTALL=yes";