2019-11-10 17:44:34 +01:00
|
|
|
{stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU, libGL, freeglut, camlp4 } :
|
2013-06-04 20:49:10 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "lablgl";
|
|
|
|
in
|
|
|
|
|
2016-10-05 09:32:30 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2013-06-04 20:49:10 +02:00
|
|
|
name = "${pname}-${version}";
|
2016-10-05 09:32:30 +02:00
|
|
|
version = "1.05";
|
2013-06-04 20:49:10 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-05-26 20:31:53 +02:00
|
|
|
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz";
|
|
|
|
sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq";
|
2013-06-04 20:49:10 +02:00
|
|
|
};
|
|
|
|
|
2017-02-09 09:14:51 +01:00
|
|
|
buildInputs = [ocaml findlib lablgtk freeglut camlp4];
|
2019-11-10 17:44:34 +01:00
|
|
|
propagatedBuildInputs = [ libGLU libGL ];
|
2013-06-04 20:49:10 +02:00
|
|
|
|
2014-10-04 00:19:32 +02:00
|
|
|
patches = [ ./Makefile.config.patch ./META.patch ];
|
2013-06-04 20:49:10 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile.config \
|
|
|
|
--subst-var-by BINDIR $out/bin \
|
2016-10-05 09:32:30 +02:00
|
|
|
--subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \
|
|
|
|
--subst-var-by DLLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \
|
2013-06-04 20:49:10 +02:00
|
|
|
--subst-var-by TKINCLUDES "" \
|
|
|
|
--subst-var-by XINCLUDES ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2019-10-27 14:03:25 +01:00
|
|
|
buildFlags = [ "lib" "libopt" "glut" "glutopt" ];
|
2013-06-04 20:49:10 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
2016-10-05 09:32:30 +02:00
|
|
|
cp ./META $out/lib/ocaml/${ocaml.version}/site-lib/lablgl
|
2013-06-04 20:49:10 +02:00
|
|
|
'';
|
|
|
|
|
2014-10-04 00:19:32 +02:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html";
|
2013-06-04 20:49:10 +02:00
|
|
|
description = "OpenGL bindings for ocaml";
|
2014-10-04 00:19:32 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ pSub vbgl ];
|
2017-07-02 09:15:45 +02:00
|
|
|
broken = stdenv.isDarwin;
|
2013-06-04 20:49:10 +02:00
|
|
|
};
|
|
|
|
}
|