Skip to content

Commit

Permalink
ocamlgraph: 1.8.5 -> 1.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
maurer authored and vbgl committed Mar 29, 2017
1 parent 0784125 commit 3c7b0d3
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions pkgs/development/ocaml-modules/ocamlgraph/default.nix
@@ -1,24 +1,22 @@
{stdenv, fetchurl, ocaml, findlib, ocamlPackages }:
{stdenv, fetchurl, ocaml, findlib, lablgtk}:

stdenv.mkDerivation rec {
name = "ocamlgraph-${version}";
version = "1.8.5";
version = "1.8.7";

src = fetchurl {
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
sha256 = "0bxqxzd5sd7siz57vhzb8bmiz1ddhgdv49gcsmwwfmd16mj4cryi";
sha256 = "1845r537swjil2fcj7lgbibc2zybfwqqasrd2s7bncajs83cl1nz";
};

buildInputs = [ ocaml findlib ocamlPackages.lablgtk ocamlPackages.camlp4 ];
buildInputs = [ ocaml findlib lablgtk ];

patches = ./destdir.patch;

# some patching is required so that the lablgtk2 library is taken into account. It
# does not reside in a subdirectory of the default library path, hence:
# * configure looked in the wrong path
# * ocaml needs that directory and the stubs directory as -I flag
postPatch = ''
sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(prefix)/lib/ocaml/${ocaml.version}/site-lib/ocamlgraph@' Makefile.in
sed -i 's@$OCAMLLIB/lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2@' configure Makefile.in
sed -i 's@+lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile
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;
Expand Down

0 comments on commit 3c7b0d3

Please sign in to comment.