Skip to content

Commit

Permalink
Merge pull request NixOS#33642 from teozkr/libguestfs-java
Browse files Browse the repository at this point in the history
Added JDK dependency to libguestfs
  • Loading branch information
edolstra authored Jan 9, 2018
2 parents c23b036 + 440cfd3 commit 73a01aa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkgs/development/libraries/libguestfs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 }:
, getopt, perlPackages, ocamlPackages
, javaSupport ? false, jdk ? null }:

assert javaSupport -> jdk != null;

stdenv.mkDerivation rec {
name = "libguestfs-${version}";
Expand All @@ -24,7 +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
] ++ (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
Expand All @@ -40,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";
Expand Down

0 comments on commit 73a01aa

Please sign in to comment.