2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv, lib, fetchurl, which, pkg-config, ocaml, findlib, imagemagick }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.06"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "magick is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml-magick";
|
|
|
|
version = "0.34";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/ImageMagick/OCaml-ImageMagick-${version}.tgz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0gn9l2qdr8gby2x8c2mb59x1kipb2plr45rbq6ymcxyi0wmzfh3q";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ which pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ ocaml findlib imagemagick ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
preConfigure = "substituteInPlace Makefile --replace gcc $CC";
|
|
|
|
|
|
|
|
installTargets = [ "find_install" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/";
|
|
|
|
description = "ImageMagick Binding for OCaml";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = imagemagick.meta.platforms;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ vbgl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|