2021-01-22 11:25:31 +00:00
|
|
|
{ lib, stdenv, src, version }:
|
2019-12-05 19:41:34 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit src version;
|
2022-03-01 10:39:32 +00:00
|
|
|
pname = "ocaml-bs";
|
2019-12-05 19:41:34 +00:00
|
|
|
configurePhase = ''
|
|
|
|
./configure -prefix $out
|
|
|
|
'';
|
2022-06-26 21:28:11 +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.
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-26 21:28:11 +00:00
|
|
|
|
2019-12-05 19:41:34 +00:00
|
|
|
buildPhase = ''
|
|
|
|
make -j9 world.opt
|
|
|
|
'';
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2019-12-05 19:41:34 +00:00
|
|
|
branch = "4.06";
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|