nixpkgs/pkgs/development/ocaml-modules/camlpdf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
842 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib }:
2019-09-23 19:55:47 +00:00
if lib.versionOlder ocaml.version "4.10"
2019-09-23 19:55:47 +00:00
then throw "camlpdf is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
version = "2.7";
pname = "ocaml${ocaml.version}-camlpdf";
2019-09-23 19:55:47 +00:00
src = fetchFromGitHub {
owner = "johnwhitington";
repo = "camlpdf";
rev = "v${version}";
hash = "sha256-SVmLWffB7GF+Bu0tj5fIvQVMRh6uV3u2G3rC4cVH2Gw=";
};
nativeBuildInputs = [ which ocaml findlib ];
strictDeps = true;
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];
};
}