2021-01-11 04:49:15 -08:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib
|
2020-08-21 22:55:58 -07:00
|
|
|
, gtkSupport ? true
|
|
|
|
, lablgtk
|
|
|
|
}:
|
2011-11-27 15:58:46 -08:00
|
|
|
|
2016-10-05 00:32:30 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "ocamlgraph";
|
2017-10-17 22:25:48 -07:00
|
|
|
version = "1.8.8";
|
2011-11-27 15:58:46 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
|
2017-10-17 22:25:48 -07:00
|
|
|
sha256 = "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr";
|
2011-11-27 15:58:46 -08:00
|
|
|
};
|
|
|
|
|
2020-08-21 22:55:58 -07:00
|
|
|
buildInputs = [ ocaml findlib ]
|
2021-01-11 04:49:15 -08:00
|
|
|
++ lib.optional gtkSupport lablgtk
|
2020-08-21 22:55:58 -07:00
|
|
|
;
|
2011-11-27 15:58:46 -08:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2020-08-21 22:55:58 -07:00
|
|
|
buildFlags = [ "all" ];
|
|
|
|
installTargets = [ "install-findlib" ];
|
|
|
|
|
2021-01-11 04:49:15 -08:00
|
|
|
postInstall = lib.optionalString gtkSupport ''
|
2020-08-21 22:55:58 -07:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp dgraph/dgraph.opt $out/bin/graph-viewer
|
|
|
|
cp editor/editor.opt $out/bin/graph-editor
|
2011-11-27 15:58:46 -08:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://ocamlgraph.lri.fr/";
|
2013-10-06 02:49:53 -07:00
|
|
|
description = "Graph library for Objective Caml";
|
2021-01-11 04:49:15 -08:00
|
|
|
license = lib.licenses.gpl2Oss;
|
2015-12-24 09:49:07 -08:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2011-11-27 15:58:46 -08:00
|
|
|
maintainers = [
|
2021-01-11 04:49:15 -08:00
|
|
|
lib.maintainers.kkallio
|
2011-11-27 15:58:46 -08:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|