2016-12-02 19:36:07 +00:00
|
|
|
{stdenv, fetchurl, omake, ocaml, libtiff, libjpeg, libpng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }:
|
2013-06-04 18:49:10 +00:00
|
|
|
|
2014-10-31 12:25:53 +00:00
|
|
|
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00";
|
|
|
|
|
2018-08-21 13:40:03 +00:00
|
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.06"
|
|
|
|
then throw "camlimages-4.1.2 is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2013-06-04 18:49:10 +00:00
|
|
|
let
|
|
|
|
pname = "camlimages";
|
2014-10-31 12:25:53 +00:00
|
|
|
version = "4.1.2";
|
2013-06-04 18:49:10 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
2013-06-25 07:17:34 +00:00
|
|
|
src = fetchurl {
|
2014-10-31 12:25:53 +00:00
|
|
|
url = "https://bitbucket.org/camlspotter/camlimages/get/${version}.tar.bz2";
|
|
|
|
sha256 = "1ppddhfknpirj1vilm5dxgyp82kf7ahpvjmh7z75a1fnaqv3kpki";
|
2013-06-04 18:49:10 +00:00
|
|
|
};
|
|
|
|
|
2016-12-02 19:36:07 +00:00
|
|
|
buildInputs = [ ocaml omake findlib graphicsmagick ghostscript ];
|
2013-06-26 14:48:45 +00:00
|
|
|
|
2014-10-03 22:27:14 +00:00
|
|
|
propagatedBuildInputs = [libtiff libjpeg libpng giflib freetype libXpm ];
|
2013-06-04 18:49:10 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
omake
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
omake install
|
|
|
|
'';
|
|
|
|
|
2014-10-03 22:27:14 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://bitbucket.org/camlspotter/camlimages;
|
|
|
|
description = "OCaml image processing library";
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2013-06-04 18:49:10 +00:00
|
|
|
};
|
|
|
|
}
|