2017-01-25 07:05:54 +00:00
|
|
|
{stdenv, fetchurl, ocaml, findlib, lablgtk}:
|
2011-11-27 23:58:46 +00:00
|
|
|
|
2016-10-05 07:32:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2011-11-27 23:58:46 +00:00
|
|
|
name = "ocamlgraph-${version}";
|
2017-01-25 07:05:54 +00:00
|
|
|
version = "1.8.7";
|
2011-11-27 23:58:46 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
|
2017-01-25 07:05:54 +00:00
|
|
|
sha256 = "1845r537swjil2fcj7lgbibc2zybfwqqasrd2s7bncajs83cl1nz";
|
2011-11-27 23:58:46 +00:00
|
|
|
};
|
|
|
|
|
2017-01-25 07:05:54 +00:00
|
|
|
buildInputs = [ ocaml findlib lablgtk ];
|
|
|
|
|
|
|
|
patches = ./destdir.patch;
|
2011-11-27 23:58:46 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2017-01-25 07:05:54 +00:00
|
|
|
sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml.version}/site-lib/ocamlgraph@' Makefile.in
|
|
|
|
sed -i 's@OCAMLFINDDEST := -destdir $(DESTDIR)@@' Makefile.in
|
|
|
|
sed -i 's@+lablgtk2@${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile
|
2011-11-27 23:58:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make all
|
|
|
|
make install-findlib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://ocamlgraph.lri.fr/;
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Graph library for Objective Caml";
|
2014-11-06 00:44:33 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2Oss;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2011-11-27 23:58:46 +00:00
|
|
|
maintainers = [
|
|
|
|
stdenv.lib.maintainers.kkallio
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|