2020-08-22 06:55:58 +01:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib
|
|
|
|
, gtkSupport ? true
|
|
|
|
, lablgtk
|
|
|
|
}:
|
2011-11-27 23:58:46 +00:00
|
|
|
|
2016-10-05 08:32:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ocamlgraph";
|
2017-10-18 06:25:48 +01:00
|
|
|
version = "1.8.8";
|
2011-11-27 23:58:46 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
|
2017-10-18 06:25:48 +01:00
|
|
|
sha256 = "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr";
|
2011-11-27 23:58:46 +00:00
|
|
|
};
|
|
|
|
|
2020-08-22 06:55:58 +01:00
|
|
|
buildInputs = [ ocaml findlib ]
|
|
|
|
++ stdenv.lib.optional gtkSupport lablgtk
|
|
|
|
;
|
2011-11-27 23:58:46 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2020-08-22 06:55:58 +01:00
|
|
|
buildFlags = [ "all" ];
|
|
|
|
installTargets = [ "install-findlib" ];
|
|
|
|
|
|
|
|
postInstall = stdenv.lib.optionalString gtkSupport ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp dgraph/dgraph.opt $out/bin/graph-viewer
|
|
|
|
cp editor/editor.opt $out/bin/graph-editor
|
2011-11-27 23:58:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://ocamlgraph.lri.fr/";
|
2013-10-06 10:49:53 +01: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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|