1 { lib, stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }:
3 if lib.versionOlder ocaml.version "4.10"
4 then throw "cpdf is not available for OCaml ${ocaml.version}"
7 stdenv.mkDerivation rec {
8 pname = "ocaml${ocaml.version}-cpdf";
11 src = fetchFromGitHub {
12 owner = "johnwhitington";
15 hash = "sha256-5gEv/lmca3FR16m4uxbCJ3y/XtTSBvoIojeKszc24ss=";
18 nativeBuildInputs = [ ocaml findlib ];
19 buildInputs = [ ncurses ];
20 propagatedBuildInputs = [ camlpdf ];
25 mkdir -p $OCAMLFIND_DESTDIR
30 cp cpdfmanual.pdf $out/share/doc/cpdf/
34 description = "PDF Command Line Tools";
35 homepage = "https://www.coherentpdf.com/";
36 license = licenses.unfree;
37 maintainers = [ maintainers.vbgl ];
39 inherit (ocaml.meta) platforms;