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