1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/ocaml-modules/ocamlgraph/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2017-01-25 07:05:54 +00:00
{stdenv, fetchurl, ocaml, findlib, lablgtk}:
2016-10-05 08:32:30 +01:00
stdenv.mkDerivation rec {
name = "ocamlgraph-${version}";
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";
};
2017-01-25 07:05:54 +00:00
buildInputs = [ ocaml findlib lablgtk ];
patches = ./destdir.patch;
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
'';
createFindlibDestdir = true;
buildPhase = ''
make all
make install-findlib
'';
meta = {
homepage = http://ocamlgraph.lri.fr/;
description = "Graph library for Objective Caml";
license = stdenv.lib.licenses.gpl2Oss;
platforms = ocaml.meta.platforms or [];
maintainers = [
stdenv.lib.maintainers.kkallio
];
};
}