camlzip: 1.05 -> 1.06 (#16443)
This commit is contained in:
@@ -2,26 +2,39 @@
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
version = "1.05";
|
||||
param =
|
||||
if stdenv.lib.versionAtLeast ocaml_version "4.02"
|
||||
then {
|
||||
version = "1.06";
|
||||
url = "1616";
|
||||
sha256 = "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68";
|
||||
patch = ./makefile_1_06.patch;
|
||||
installTargets = "install-findlib";
|
||||
} else {
|
||||
version = "1.05";
|
||||
url = "1037";
|
||||
sha256 = "930b70c736ab5a7ed1b05220102310a0a2241564786657abe418e834a538d06b";
|
||||
patch = ./makefile_1_05.patch;
|
||||
installTargets = "install";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "camlzip-${version}";
|
||||
name = "camlzip-${param.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://forge.ocamlcore.org/frs/download.php/1037/" +
|
||||
"camlzip-${version}.tar.gz";
|
||||
sha256 = "930b70c736ab5a7ed1b05220102310a0a2241564786657abe418e834a538d06b";
|
||||
url = "http://forge.ocamlcore.org/frs/download.php/${param.url}/camlzip-${param.version}.tar.gz";
|
||||
inherit (param) sha256;
|
||||
};
|
||||
|
||||
buildInputs = [zlib ocaml findlib];
|
||||
|
||||
patches = [ ./makefile.patch ];
|
||||
patches = [ param.patch ];
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
postPatch = ''
|
||||
substitute ${./META} META --subst-var-by VERSION "${version}"
|
||||
substitute ${./META} META --subst-var-by VERSION "${param.version}"
|
||||
substituteInPlace Makefile \
|
||||
--subst-var-by ZLIB_LIBDIR "${zlib.out}/lib" \
|
||||
--subst-var-by ZLIB_INCLUDE "${zlib.dev}/include"
|
||||
@@ -29,7 +42,11 @@ stdenv.mkDerivation {
|
||||
|
||||
buildFlags = "all allopt";
|
||||
|
||||
installTargets = "install";
|
||||
inherit (param) installTargets;
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/lib/ocaml/${ocaml_version}/site-lib/{,caml}zip
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://cristal.inria.fr/~xleroy/software.html#camlzip";
|
||||
|
||||
Reference in New Issue
Block a user