1 {lib, stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU, libGL, freeglut, camlp4 } :
7 stdenv.mkDerivation rec {
8 name = "${pname}-${version}";
12 url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz";
13 sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq";
16 buildInputs = [ocaml findlib lablgtk freeglut camlp4];
17 propagatedBuildInputs = [ libGLU libGL ];
19 patches = [ ./Makefile.config.patch ./META.patch ];
22 substituteInPlace Makefile.config \
23 --subst-var-by BINDIR $out/bin \
24 --subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \
25 --subst-var-by DLLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \
26 --subst-var-by TKINCLUDES "" \
27 --subst-var-by XINCLUDES ""
30 createFindlibDestdir = true;
32 buildFlags = [ "lib" "libopt" "glut" "glutopt" ];
35 cp ./META $out/lib/ocaml/${ocaml.version}/site-lib/lablgl
39 homepage = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html";
40 description = "OpenGL bindings for ocaml";
41 license = licenses.gpl2;
42 maintainers = with maintainers; [ pSub vbgl ];
43 broken = stdenv.isDarwin;