2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, src, version }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit src version;
|
2022-03-10 19:12:11 +00:00
|
|
|
pname = "ocaml-bs";
|
2020-04-24 23:36:52 +00:00
|
|
|
configurePhase = ''
|
|
|
|
./configure -prefix $out
|
|
|
|
'';
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
# Workaround ocaml-4.06 limitation of duplicate definitions.
|
|
|
|
# ld: libcamlrun.a(minor_gc.o):/build/ocaml/byterun/caml/major_gc.h:67: multiple definition of
|
|
|
|
# `caml_major_ring'; libcamlrun.a(stacks.o):/build/ocaml/byterun/caml/major_gc.h:67: first defined here
|
|
|
|
# Match -fcommon workaround in ocaml-4.06 itself.
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPhase = ''
|
|
|
|
make -j9 world.opt
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
branch = "4.06";
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|