2021-01-19 06:50:56 +00:00
|
|
|
{ stdenv, lib, fetchurl, which, pkg-config, 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 19:35:50 +01: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 02:11:51 +01: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";
|
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ which pkg-config ];
|
2014-12-28 17:03:27 +00:00
|
|
|
buildInputs = [ ocaml findlib imagemagick ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2016-08-19 23:05:35 +01:00
|
|
|
preConfigure = "substituteInPlace Makefile --replace gcc $CC";
|
|
|
|
|
2014-12-28 17:03:27 +00:00
|
|
|
installTargets = [ "find_install" ];
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01: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
|
|
|
};
|
|
|
|
}
|