mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 22:20:51 +00:00
39 lines
989 B
Nix
39 lines
989 B
Nix
{ stdenv, fetchgit, ocaml, findlib, ncurses }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "2.2.1";
|
|
name = "ocaml${ocaml.version}-camlpdf-${version}";
|
|
src = fetchgit {
|
|
url = https://github.com/johnwhitington/camlpdf.git;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "0wa4rw8ccpb8xprslg88hbk352bi8bia4iffc22y55gkjr60f8gj";
|
|
};
|
|
|
|
buildInputs = [ ocaml findlib ncurses ];
|
|
|
|
# Version number in META file is wrong
|
|
patchPhase = ''
|
|
patch -p 0 META <<EOF
|
|
3c3
|
|
< version="1.7.1"
|
|
---
|
|
> version="${version}"
|
|
EOF
|
|
'';
|
|
|
|
makeFlags = with stdenv.lib;
|
|
optionals (versionAtLeast ocaml.version "4.06") [
|
|
"OCAMLBCFLAGS+=-unsafe-string"
|
|
"OCAMLNCFLAGS+=-unsafe-string"
|
|
];
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
meta = with stdenv.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];
|
|
};
|
|
}
|