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