3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix
Pascal Wittmann 86b7cf8bb4 Added llpp, a mupdf based pdf pager written in ocaml.
Updated lablgl to 1.05 and mupdf to 1.4.
Added myself as maintainer for lablgl.
2014-06-04 22:15:06 +02:00

45 lines
1.2 KiB
Nix

{stdenv, fetchurl, ocaml, lablgtk, findlib, mesa, freeglut } :
let
ocaml_version = (builtins.parseDrvName ocaml.name).version;
pname = "lablgl";
version = "1.05";
in
stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz";
sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq";
};
buildInputs = [ocaml findlib lablgtk mesa freeglut ];
patches = [ ./Makefile.config.patch ];
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
'';
meta = {
homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html;
description = "OpenGL bindings for ocaml";
license = "GnuGPLV2";
maintainers = [ stdenv.lib.maintainers.psub ];
};
}