2021-04-27 00:39:01 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitLab
|
|
|
|
, ocaml
|
|
|
|
, findlib
|
|
|
|
, omake
|
|
|
|
, graphicsmagick
|
|
|
|
, libpng
|
|
|
|
, libjpeg
|
|
|
|
, libexif
|
|
|
|
, libtiff
|
|
|
|
, libXpm
|
|
|
|
, freetype
|
|
|
|
, giflib
|
|
|
|
, ghostscript
|
|
|
|
}:
|
|
|
|
|
2022-02-14 11:30:15 +01:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02" && lib.versionOlder ocaml.version "4.10")
|
|
|
|
"camlimages 4.2.4 is not available for OCaml ${ocaml.version}"
|
2021-04-27 00:39:01 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
|
|
|
pname = "camlimages";
|
|
|
|
version = "4.2.4";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "camlspotter";
|
|
|
|
repo = pname;
|
|
|
|
rev = "c4f0ec4178fd18cb85872181965c5f020c349160";
|
|
|
|
sha256 = "17hvsql5dml7ialjcags8wphs7w6z88b2rgjir1382bg8vn62bkr";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
omake
|
|
|
|
ocaml
|
|
|
|
findlib
|
|
|
|
graphicsmagick
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
libpng
|
|
|
|
libjpeg
|
|
|
|
libexif
|
|
|
|
libtiff
|
|
|
|
libXpm
|
|
|
|
freetype
|
|
|
|
giflib
|
|
|
|
ghostscript
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
omake
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-14 11:30:15 +01:00
|
|
|
runHook preInstall
|
2021-04-27 00:39:01 +02:00
|
|
|
omake install
|
2022-02-14 11:30:15 +01:00
|
|
|
runHook postInstall
|
2021-04-27 00:39:01 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
# 4.2.5 requires OCaml >= 4.06
|
|
|
|
branch = "4.2.4";
|
|
|
|
homepage = "https://gitlab.com/camlspotter/camlimages";
|
|
|
|
description = "OCaml image processing library";
|
|
|
|
license = licenses.lgpl2Only;
|
|
|
|
maintainers = [
|
|
|
|
maintainers.vbgl
|
|
|
|
maintainers.sternenseemann
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|