2021-01-11 12:49:15 +00:00
|
|
|
{ stdenv, lib, fetchurl, which, pkgconfig, ocaml, findlib, imagemagick }:
|
2014-12-28 17:03:27 +00:00
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.06"
|
2018-08-21 18:35:50 +00:00
|
|
|
then throw "magick is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2014-12-28 17:03:27 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "ocaml-magick-0.34";
|
|
|
|
src = fetchurl {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/ImageMagick/OCaml-ImageMagick-0.34.tgz";
|
2014-12-28 17:03:27 +00:00
|
|
|
sha256 = "0gn9l2qdr8gby2x8c2mb59x1kipb2plr45rbq6ymcxyi0wmzfh3q";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ which pkgconfig ];
|
|
|
|
buildInputs = [ ocaml findlib imagemagick ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2016-08-19 22:05:35 +00:00
|
|
|
preConfigure = "substituteInPlace Makefile --replace gcc $CC";
|
|
|
|
|
2014-12-28 17:03:27 +00:00
|
|
|
installTargets = [ "find_install" ];
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/";
|
2014-12-28 17:03:27 +00:00
|
|
|
description = "ImageMagick Binding for OCaml";
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.mit;
|
2014-12-28 17:03:27 +00:00
|
|
|
platforms = imagemagick.meta.platforms;
|
2021-01-11 12:49:15 +00:00
|
|
|
maintainers = with lib.maintainers; [ vbgl ];
|
2014-12-28 17:03:27 +00:00
|
|
|
};
|
|
|
|
}
|