From 2870979a5340060dab29db0d2a3ee7a3524f1fb1 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 8 Oct 2017 17:29:41 +0000 Subject: [PATCH] ocamlPackages.ounit: fix for OCaml 4.06 --- pkgs/development/ocaml-modules/ounit/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/ounit/default.nix b/pkgs/development/ocaml-modules/ounit/default.nix index 7179b8408a0..533a41cc435 100644 --- a/pkgs/development/ocaml-modules/ounit/default.nix +++ b/pkgs/development/ocaml-modules/ounit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, camlp4 }: +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild }: stdenv.mkDerivation { name = "ounit-2.0.0"; @@ -8,7 +8,13 @@ stdenv.mkDerivation { sha256 = "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"; }; - buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + patches = with stdenv.lib; + optional (versionAtLeast ocaml.version "4.02") (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ounit/ounit.2.0.0/files/safe-string.patch"; + sha256 = "0hbd2sqdz75lv5ax82yhsfdk1dlcvq12xpys6n85ysmrl0c3d3lk"; + }); + + buildInputs = [ ocaml findlib ocamlbuild ]; dontAddPrefix = true;