@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, makeWrapper, ocaml, ncurses }:
1+{ stdenv, fetchurl, makeWrapper, ocaml, ncurses, writeText }:
4 pname = "camlidl";
4 pname = "camlidl";
@@ -36,6 +36,12 @@ stdenv.mkDerivation rec {
36 ln -s $out/camlidl $out/bin
36 ln -s $out/camlidl $out/bin
39+ setupHook = writeText "setupHook.sh" ''
40+ export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
41+ export NIX_CFLAGS_COMPILE+=" -isystem $1/lib/ocaml/${ocaml.version}/site-lib/camlidl"
42+ export NIX_LDFLAGS+=" -L $1/lib/ocaml/${ocaml.version}/site-lib/camlidl"
40 description = "A stub code generator and COM binding for Objective Caml";
46 description = "A stub code generator and COM binding for Objective Caml";
41 homepage = "${webpage}";
47 homepage = "${webpage}";