diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2021-04-20 05:33:20 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2021-04-27 08:42:50 +0200 |
commit | 731288ed01ab4fe99f54d68f2aa9df0c1196b0b9 (patch) | |
tree | d28a7859e8a10d64cd00cce08799dc5ac146823a /pkgs/development/libraries/libguestfs | |
parent | 61a31ad3d6c58cf7cc7c57fb998835c019e458d2 (diff) | |
download | nixpkgs-731288ed01ab4fe99f54d68f2aa9df0c1196b0b9.tar nixpkgs-731288ed01ab4fe99f54d68f2aa9df0c1196b0b9.tar.gz nixpkgs-731288ed01ab4fe99f54d68f2aa9df0c1196b0b9.tar.bz2 nixpkgs-731288ed01ab4fe99f54d68f2aa9df0c1196b0b9.tar.lz nixpkgs-731288ed01ab4fe99f54d68f2aa9df0c1196b0b9.tar.xz nixpkgs-731288ed01ab4fe99f54d68f2aa9df0c1196b0b9.tar.zst nixpkgs-731288ed01ab4fe99f54d68f2aa9df0c1196b0b9.zip |
libguestfs: fix build with OCaml 4.12
Diffstat (limited to 'pkgs/development/libraries/libguestfs')
-rw-r--r-- | pkgs/development/libraries/libguestfs/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libguestfs/ocaml-4.12.patch | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index 0f56f8c97f3..47f6ffe2c52 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ''; configureFlags = [ "--disable-appliance" "--disable-daemon" "--with-distro=NixOS" ] ++ lib.optionals (!javaSupport) [ "--disable-java" "--without-java" ]; - patches = [ ./libguestfs-syms.patch ]; + patches = [ ./libguestfs-syms.patch ./ocaml-4.12.patch ]; NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2/"; installFlags = [ "REALLY_INSTALL=yes" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libguestfs/ocaml-4.12.patch b/pkgs/development/libraries/libguestfs/ocaml-4.12.patch new file mode 100644 index 00000000000..032527d5713 --- /dev/null +++ b/pkgs/development/libraries/libguestfs/ocaml-4.12.patch @@ -0,0 +1,11 @@ +--- a/common/mlstdutils/std_utils.ml 2019-02-07 15:45:56.516955598 +0100 ++++ b/common/mlstdutils/std_utils.ml 2019-02-07 15:45:56.516955598 +0100 +@@ -305,7 +305,7 @@ + | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs + | _ -> invalid_arg "combine3" + +- let rec assoc_lbl ?(cmp = compare) ~default x = function ++ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function + | [] -> default + | (y, y') :: _ when cmp x y = 0 -> y' + | _ :: ys -> assoc_lbl ~cmp ~default x ys |