3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/camlpdf/default.nix

30 lines
829 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib }:
2019-09-23 20:55:47 +01:00
if !lib.versionAtLeast ocaml.version "4.02"
2019-09-23 20:55:47 +01:00
then throw "camlpdf is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
version = "2.4";
name = "ocaml${ocaml.version}-camlpdf-${version}";
2019-09-23 20:55:47 +01:00
src = fetchFromGitHub {
owner = "johnwhitington";
repo = "camlpdf";
rev = "v${version}";
sha256 = "09kzrgmlxb567315p3fy59ba0kv7xhp548n9i3l4wf9n06p0ww9m";
};
buildInputs = [ which ocaml findlib ];
preInstall = ''
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
'';
meta = with lib; {
description = "An OCaml library for reading, writing and modifying PDF files";
homepage = "https://github.com/johnwhitington/camlpdf";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [vbgl];
};
}