3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/ocamlgraph/default.nix

40 lines
919 B
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, ocaml, findlib
, gtkSupport ? true
, lablgtk
}:
2016-10-05 08:32:30 +01:00
stdenv.mkDerivation rec {
pname = "ocamlgraph";
2017-10-18 06:25:48 +01:00
version = "1.8.8";
src = fetchurl {
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
2017-10-18 06:25:48 +01:00
sha256 = "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr";
};
buildInputs = [ ocaml findlib ]
++ lib.optional gtkSupport lablgtk
;
createFindlibDestdir = true;
buildFlags = [ "all" ];
installTargets = [ "install-findlib" ];
postInstall = lib.optionalString gtkSupport ''
mkdir -p $out/bin
cp dgraph/dgraph.opt $out/bin/graph-viewer
cp editor/editor.opt $out/bin/graph-editor
'';
meta = {
homepage = "http://ocamlgraph.lri.fr/";
description = "Graph library for Objective Caml";
license = lib.licenses.gpl2Oss;
platforms = ocaml.meta.platforms or [];
maintainers = [
lib.maintainers.kkallio
];
};
}