2013-06-04 19:49:10 +01:00
|
|
|
{stdenv, fetchurl, ocaml, lablgtk, findlib, mesa, freeglut } :
|
|
|
|
|
|
|
|
let
|
|
|
|
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
|
|
|
pname = "lablgl";
|
2014-05-26 19:31:53 +01:00
|
|
|
version = "1.05";
|
2013-06-04 19:49:10 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2014-05-26 19:31:53 +01:00
|
|
|
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz";
|
|
|
|
sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq";
|
2013-06-04 19:49:10 +01:00
|
|
|
};
|
|
|
|
|
2014-10-03 23:19:32 +01:00
|
|
|
buildInputs = [ocaml findlib lablgtk freeglut ];
|
|
|
|
propagatedBuildInputs = [ mesa ];
|
2013-06-04 19:49:10 +01:00
|
|
|
|
2014-10-03 23:19:32 +01:00
|
|
|
patches = [ ./Makefile.config.patch ./META.patch ];
|
2013-06-04 19:49:10 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile.config \
|
|
|
|
--subst-var-by BINDIR $out/bin \
|
|
|
|
--subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl \
|
|
|
|
--subst-var-by DLLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl/stublibs \
|
|
|
|
--subst-var-by TKINCLUDES "" \
|
|
|
|
--subst-var-by XINCLUDES ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
buildFlags = "lib libopt glut glutopt";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp ./META $out/lib/ocaml/${ocaml_version}/site-lib/lablgl
|
|
|
|
'';
|
|
|
|
|
2014-10-03 23:19:32 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-06-04 19:49:10 +01:00
|
|
|
homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html;
|
|
|
|
description = "OpenGL bindings for ocaml";
|
2014-10-03 23:19:32 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ pSub vbgl ];
|
2013-06-04 19:49:10 +01:00
|
|
|
};
|
|
|
|
}
|