3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2019-11-10 16:44:34 +00:00
{stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU, libGL, freeglut, camlp4 } :
let
pname = "lablgl";
in
2016-10-05 08:32:30 +01:00
stdenv.mkDerivation rec {
name = "${pname}-${version}";
2016-10-05 08:32:30 +01:00
version = "1.05";
src = fetchurl {
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz";
sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq";
};
buildInputs = [ocaml findlib lablgtk freeglut camlp4];
2019-11-10 16:44:34 +00:00
propagatedBuildInputs = [ libGLU libGL ];
2014-10-03 23:19:32 +01:00
patches = [ ./Makefile.config.patch ./META.patch ];
preConfigure = ''
substituteInPlace Makefile.config \
--subst-var-by BINDIR $out/bin \
2016-10-05 08:32:30 +01: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 \
--subst-var-by TKINCLUDES "" \
--subst-var-by XINCLUDES ""
'';
createFindlibDestdir = true;
buildFlags = "lib libopt glut glutopt";
postInstall = ''
2016-10-05 08:32:30 +01:00
cp ./META $out/lib/ocaml/${ocaml.version}/site-lib/lablgl
'';
2014-10-03 23:19:32 +01:00
meta = with stdenv.lib; {
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 ];
broken = stdenv.isDarwin;
};
}