1 { lib, stdenv, fetchFromGitHub, which, ocaml, findlib }:
3 if lib.versionOlder ocaml.version "4.10"
4 then throw "camlpdf is not available for OCaml ${ocaml.version}"
7 stdenv.mkDerivation rec {
9 pname = "ocaml${ocaml.version}-camlpdf";
11 src = fetchFromGitHub {
12 owner = "johnwhitington";
15 sha256 = "sha256:1qmsa0xgi960y7r20mvf8hxiiml7l1908s4dm7nq262f19w51gsl";
18 nativeBuildInputs = [ which ocaml findlib ];
23 mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
27 description = "An OCaml library for reading, writing and modifying PDF files";
28 homepage = "https://github.com/johnwhitington/camlpdf";
29 license = licenses.lgpl21Plus;
30 maintainers = with maintainers; [vbgl];