ocamlPackages.biniou: 1.0.9 -> 1.2.0

This commit is contained in:
Vincent Laporte 2017-10-06 20:23:12 +00:00
parent 96874c6e71
commit cbf5307020
3 changed files with 59 additions and 30 deletions

View File

@ -0,0 +1,36 @@
{stdenv, fetchurl, ocaml, findlib, easy-format}:
let
pname = "biniou";
version = "1.0.9";
webpage = "http://mjambon.com/${pname}.html";
in
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "http://mjambon.com/releases/${pname}/${name}.tar.gz";
sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb";
};
buildInputs = [ ocaml findlib easy-format ];
createFindlibDestdir = true;
makeFlags = "PREFIX=$(out)";
preBuild = ''
mkdir $out/bin
'';
meta = with stdenv.lib; {
description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
homepage = "${webpage}";
license = licenses.bsd3;
maintainers = [ maintainers.vbgl ];
platforms = ocaml.meta.platforms or [];
};
}

View File

@ -1,36 +1,26 @@
{stdenv, fetchurl, ocaml, findlib, easy-format}: { stdenv, fetchFromGitHub, ocaml, findlib, jbuilder, easy-format }:
let
pname = "biniou";
version = "1.0.9";
webpage = "http://mjambon.com/${pname}.html";
in
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.2.0";
name = "ocaml${ocaml.version}-biniou-${version}";
src = fetchFromGitHub {
owner = "mjambon";
repo = "biniou";
rev = "v${version}";
sha256 = "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb";
};
name = "${pname}-${version}"; buildInputs = [ ocaml findlib jbuilder ];
src = fetchurl { propagatedBuildInputs = [ easy-format ];
url = "http://mjambon.com/releases/${pname}/${name}.tar.gz";
sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb";
};
buildInputs = [ ocaml findlib easy-format ]; inherit (jbuilder) installPhase;
createFindlibDestdir = true; meta = {
inherit (src.meta) homepage;
makeFlags = "PREFIX=$(out)"; inherit (ocaml.meta) platforms;
description = "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
preBuild = '' maintainers = [ stdenv.lib.maintainers.vbgl ];
mkdir $out/bin license = stdenv.lib.licenses.bsd3;
''; };
meta = with stdenv.lib; {
description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
homepage = "${webpage}";
license = licenses.bsd3;
maintainers = [ maintainers.vbgl ];
platforms = ocaml.meta.platforms or [];
};
} }

View File

@ -114,7 +114,10 @@ let
benchmark = callPackage ../development/ocaml-modules/benchmark { }; benchmark = callPackage ../development/ocaml-modules/benchmark { };
biniou = callPackage ../development/ocaml-modules/biniou { }; biniou =
if lib.versionOlder "4.02" ocaml.version
then callPackage ../development/ocaml-modules/biniou { }
else callPackage ../development/ocaml-modules/biniou/1.0.nix { };
bin_prot_p4 = callPackage ../development/ocaml-modules/bin_prot { }; bin_prot_p4 = callPackage ../development/ocaml-modules/bin_prot { };