2012-07-12 17:22:45 +02:00
|
|
|
{stdenv, fetchurl, ocaml, findlib, ocamlPackages }:
|
2011-11-28 00:58:46 +01:00
|
|
|
|
2016-10-05 09:32:30 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2011-11-28 00:58:46 +01:00
|
|
|
name = "ocamlgraph-${version}";
|
2016-10-05 09:32:30 +02:00
|
|
|
version = "1.8.5";
|
2011-11-28 00:58:46 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
|
2014-05-01 09:28:23 +02:00
|
|
|
sha256 = "0bxqxzd5sd7siz57vhzb8bmiz1ddhgdv49gcsmwwfmd16mj4cryi";
|
2011-11-28 00:58:46 +01:00
|
|
|
};
|
|
|
|
|
2014-09-23 21:48:50 +02:00
|
|
|
buildInputs = [ ocaml findlib ocamlPackages.lablgtk ocamlPackages.camlp4 ];
|
2011-11-28 00:58:46 +01:00
|
|
|
|
2012-07-12 17:22:45 +02:00
|
|
|
# some patching is required so that the lablgtk2 library is taken into account. It
|
|
|
|
# does not reside in a subdirectory of the default library path, hence:
|
|
|
|
# * configure looked in the wrong path
|
|
|
|
# * ocaml needs that directory and the stubs directory as -I flag
|
2011-11-28 00:58:46 +01:00
|
|
|
postPatch = ''
|
2017-03-06 12:51:03 +01:00
|
|
|
sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(prefix)/lib/ocaml/${ocaml.version}/site-lib/ocamlgraph@' Makefile.in
|
2016-10-05 09:32:30 +02:00
|
|
|
sed -i 's@$OCAMLLIB/lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2@' configure Makefile.in
|
|
|
|
sed -i 's@+lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile
|
2011-11-28 00:58:46 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make all
|
|
|
|
make install-findlib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://ocamlgraph.lri.fr/;
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Graph library for Objective Caml";
|
2014-11-06 01:44:33 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Oss;
|
2015-12-24 18:49:07 +01:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2011-11-28 00:58:46 +01:00
|
|
|
maintainers = [
|
|
|
|
stdenv.lib.maintainers.kkallio
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|