2021-01-15 22:18:51 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib
|
2020-09-25 04:45:31 +00:00
|
|
|
, gtkSupport ? true
|
|
|
|
, lablgtk
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocamlgraph";
|
|
|
|
version = "1.8.8";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
|
|
|
|
sha256 = "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr";
|
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
buildInputs = [ ocaml findlib ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional gtkSupport lablgtk
|
2020-09-25 04:45:31 +00:00
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
buildFlags = [ "all" ];
|
|
|
|
installTargets = [ "install-findlib" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
postInstall = lib.optionalString gtkSupport ''
|
2020-09-25 04:45:31 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp dgraph/dgraph.opt $out/bin/graph-viewer
|
|
|
|
cp editor/editor.opt $out/bin/graph-editor
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://ocamlgraph.lri.fr/";
|
|
|
|
description = "Graph library for Objective Caml";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2Oss;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
maintainers = [
|
2021-01-15 22:18:51 +00:00
|
|
|
lib.maintainers.kkallio
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|