ocamlPackages.asn1-combinators: 0.2.0 -> 0.2.2

This commit is contained in:
sternenseemann 2020-04-14 21:00:03 +02:00 committed by Vincent Laporte
parent 924e5cdc55
commit 90bc1492ca

View File

@ -1,45 +1,27 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild { lib, buildDunePackage, fetchurl
, cstruct, zarith, ounit, result, topkg, ptime , cstruct, zarith, bigarray-compat, stdlib-shims, ptime, alcotest
}: }:
let param = buildDunePackage rec {
if stdenv.lib.versionAtLeast ocaml.version "4.02" then { minimumOCamlVersion = "4.05";
version = "0.2.0";
sha256 = "0yfq4hnyzx6hy05m60007cfpq88wxwa8wqzib19lnk2qrgy772mx";
propagatedBuildInputs = [ ptime ];
} else {
version = "0.1.3";
sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj";
propagatedBuildInputs = [ ];
};
in
stdenv.mkDerivation rec { pname = "asn1-combinators";
name = "ocaml${ocaml.version}-asn1-combinators-${version}"; version = "0.2.2";
inherit (param) version;
src = fetchFromGitHub { src = fetchurl {
owner = "mirleft"; url = "https://github.com/mirleft/ocaml-asn1-combinators/releases/download/v${version}/asn1-combinators-v${version}.tbz";
repo = "ocaml-asn1-combinators"; sha256 = "0c9n3nki3drjwn7yv2pg7nzyzsi409laq70830wh147hvvwxbsy9";
rev = "v${version}";
inherit (param) sha256;
}; };
buildInputs = [ findlib ounit topkg ]; propagatedBuildInputs = [ cstruct zarith bigarray-compat stdlib-shims ptime ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ result cstruct zarith ] ++ param.propagatedBuildInputs;
buildPhase = "${topkg.run} build --tests true";
inherit (topkg) installPhase;
doCheck = true; doCheck = true;
checkPhase = "${topkg.run} test"; checkInputs = [ alcotest ];
meta = { meta = with lib; {
homepage = "https://github.com/mirleft/ocaml-asn1-combinators"; homepage = "https://github.com/mirleft/ocaml-asn1-combinators";
description = "Combinators for expressing ASN.1 grammars in OCaml"; description = "Combinators for expressing ASN.1 grammars in OCaml";
license = stdenv.lib.licenses.isc; license = licenses.isc;
maintainers = with stdenv.lib.maintainers; [ vbgl ]; maintainers = with maintainers; [ vbgl ];
}; };
} }