ocamlPackages.{camlpdf,cpdf}: 2.3.1 → 2.4
This commit is contained in:
parent
ac822da188
commit
c3d5131e30
@ -5,27 +5,17 @@ then throw "camlpdf is not available for OCaml ${ocaml.version}"
|
||||
else
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.3.1";
|
||||
version = "2.4";
|
||||
name = "ocaml${ocaml.version}-camlpdf-${version}";
|
||||
src = fetchFromGitHub {
|
||||
owner = "johnwhitington";
|
||||
repo = "camlpdf";
|
||||
rev = "v${version}";
|
||||
sha256 = "1q69hhk63z836jbkv4wsng27w35w0qpz01c7ax0mqm8d8kmnr0v4";
|
||||
sha256 = "09kzrgmlxb567315p3fy59ba0kv7xhp548n9i3l4wf9n06p0ww9m";
|
||||
};
|
||||
|
||||
buildInputs = [ which ocaml findlib ];
|
||||
|
||||
# Version number in META file is wrong
|
||||
patchPhase = ''
|
||||
patch -p 0 META <<EOF
|
||||
3c3
|
||||
< version="1.7.1"
|
||||
---
|
||||
> version="${version}"
|
||||
EOF
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
|
||||
'';
|
||||
|
@ -1,6 +1,10 @@
|
||||
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }:
|
||||
|
||||
let version = "2.3.1"; in
|
||||
if !lib.versionAtLeast ocaml.version "4.10"
|
||||
then throw "cpdf is not available for OCaml ${ocaml.version}"
|
||||
else
|
||||
|
||||
let version = "2.4"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ocaml${ocaml.version}-cpdf-${version}";
|
||||
@ -9,19 +13,14 @@ stdenv.mkDerivation {
|
||||
owner = "johnwhitington";
|
||||
repo = "cpdf-source";
|
||||
rev = "v${version}";
|
||||
sha256 = "1gwz0iy28f67kbqap2q10nf98dalwbi03vv5j893z2an7pb4w68z";
|
||||
sha256 = "1a8lmfc76dr8x6pxgm4aypbys02pfma9yh4z3l1qxp2q1909na5l";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace META --replace 'version="1.7"' 'version="${version}"'
|
||||
'';
|
||||
|
||||
buildInputs = [ ocaml findlib ncurses ];
|
||||
propagatedBuildInputs = [ camlpdf ];
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
postInstall = ''
|
||||
preInstall = ''
|
||||
mkdir -p $OCAMLFIND_DESTDIR
|
||||
mkdir -p $out/bin
|
||||
cp cpdf $out/bin
|
||||
mkdir -p $out/share/
|
||||
|
Loading…
Reference in New Issue
Block a user