2014-09-23 00:24:28 +02:00
|
|
|
{stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk, libgnomecanvas, libglade, gtksourceview, camlp4}:
|
2010-12-31 18:48:55 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
|
|
|
pname = "lablgtk";
|
2014-10-04 01:49:05 +02:00
|
|
|
version = "2.18.2";
|
2010-12-31 18:48:55 +01:00
|
|
|
in
|
|
|
|
|
2014-09-20 19:53:43 +02:00
|
|
|
assert stdenv.lib.versionAtLeast ocaml_version "3.12";
|
|
|
|
|
2014-10-04 01:49:05 +02:00
|
|
|
stdenv.mkDerivation {
|
2010-12-31 18:48:55 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
2014-10-04 01:49:05 +02:00
|
|
|
url = https://forge.ocamlcore.org/frs/download.php/1456/lablgtk-2.18.2.tar.gz;
|
|
|
|
sha256 = "0f9rs4av0v7p5k8hifcq4b49xx8jmmfch3sdk9pij8a8jfgwxvfy";
|
2010-12-31 18:48:55 +01:00
|
|
|
};
|
|
|
|
|
2014-09-23 00:24:28 +02:00
|
|
|
buildInputs = [ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview camlp4];
|
2010-12-31 18:48:55 +01:00
|
|
|
|
|
|
|
configureFlags = "--with-libdir=$(out)/lib/ocaml/${ocaml_version}/site-lib";
|
|
|
|
buildFlags = "world";
|
|
|
|
|
2013-06-04 20:30:50 +02:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib/ocaml/${ocaml_version}/site-lib
|
|
|
|
export OCAMLPATH=$out/lib/ocaml/${ocaml_version}/site-lib/:$OCAMLPATH
|
2010-12-31 18:48:55 +01:00
|
|
|
'';
|
|
|
|
|
2014-10-04 01:49:05 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-12-31 18:48:55 +01:00
|
|
|
platforms = ocaml.meta.platforms;
|
2014-10-04 01:49:05 +02:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
z77z roconnor vbgl
|
2010-12-31 18:48:55 +01:00
|
|
|
];
|
2014-10-04 01:49:05 +02:00
|
|
|
homepage = http://lablgtk.forge.ocamlcore.org/;
|
|
|
|
description = "An OCaml interface to gtk+";
|
|
|
|
license = licenses.lgpl21Plus;
|
2010-12-31 18:48:55 +01:00
|
|
|
};
|
2014-10-04 01:49:05 +02:00
|
|
|
}
|