1 { lib, stdenv, fetchurl, ocaml, gd, freetype, findlib, zlib, libpng, libjpeg }:
3 lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
4 "gd4o is not available for OCaml ${ocaml.version}"
6 stdenv.mkDerivation rec {
7 pname = "ocaml${ocaml.version}-gd4o";
11 url = "mirror://sourceforge/gd4o/gd4o/1.0%20Alpha%205/gd4o-1.0a5.tar.gz";
12 sha256 = "1vbyakz7byvxmqf3hj68rw15b4kb94ppcnhvmjv38rsyg05bc47s";
15 buildInputs = [ ocaml findlib libjpeg libpng ];
16 propagatedBuildInputs = [ gd zlib freetype ];
19 "CC=${stdenv.cc.targetPrefix}cc"
23 mkdir -p $OCAMLFIND_DESTDIR/stublibs
26 buildFlags = [ "all" "opt" ];
37 homepage = "https://sourceforge.net/projects/gd4o/";
38 description = "OCaml wrapper for the GD graphics library";
39 license = licenses.lgpl21Only;
40 maintainers = with maintainers; [ dandellion ];