ocamlPackages.xmlm: 1.2.0 -> 1.3.0

This commit is contained in:
Vincent Laporte 2017-10-07 05:15:50 +00:00
parent 58906f359f
commit aa3535cee5

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg }:
let
pname = "xmlm";
webpage = "http://erratique.ch/software/${pname}";
@ -6,22 +6,37 @@ in
assert stdenv.lib.versionAtLeast ocaml.version "3.12";
let param =
if stdenv.lib.versionAtLeast ocaml.version "4.02"
then {
version = "1.3.0";
sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
buildInputs = [ topkg ];
inherit (topkg) buildPhase;
} else {
version = "1.2.0";
sha256 = "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh";
buildInputs = [];
buildPhase = "./pkg/build true";
};
in
stdenv.mkDerivation rec {
name = "ocaml-${pname}-${version}";
version = "1.2.0";
inherit (param) version;
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh";
inherit (param) sha256;
};
buildInputs = [ ocaml findlib ocamlbuild opam ];
buildInputs = [ ocaml findlib ocamlbuild opam ] ++ param.buildInputs;
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
buildPhase = "./pkg/build true";
inherit (param) buildPhase;
installPhase = ''
opam-installer --script --prefix=$out ${pname}.install > install.sh