2018-01-15 05:01:50 +01:00
|
|
|
{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib
|
|
|
|
, cstruct, zarith, ounit, result, topkg, ptime
|
|
|
|
}:
|
|
|
|
|
|
|
|
let param =
|
|
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
|
|
|
|
version = "0.2.0";
|
|
|
|
sha256 = "0yfq4hnyzx6hy05m60007cfpq88wxwa8wqzib19lnk2qrgy772mx";
|
|
|
|
propagatedBuildInputs = [ ptime ];
|
|
|
|
} else {
|
|
|
|
version = "0.1.3";
|
|
|
|
sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj";
|
|
|
|
propagatedBuildInputs = [ ];
|
|
|
|
};
|
|
|
|
in
|
2015-02-26 08:33:43 +01:00
|
|
|
|
2016-11-13 11:42:42 +01:00
|
|
|
buildOcaml rec {
|
|
|
|
name = "asn1-combinators";
|
2018-01-15 05:01:50 +01:00
|
|
|
inherit (param) version;
|
2015-02-26 08:33:43 +01:00
|
|
|
|
2016-11-13 11:42:42 +01:00
|
|
|
minimumSupportedOcamlVersion = "4.01";
|
2015-02-26 08:33:43 +01:00
|
|
|
|
2016-11-13 11:42:42 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mirleft";
|
|
|
|
repo = "ocaml-asn1-combinators";
|
|
|
|
rev = "v${version}";
|
2018-01-15 05:01:50 +01:00
|
|
|
inherit (param) sha256;
|
2015-02-26 08:33:43 +01:00
|
|
|
};
|
|
|
|
|
2017-12-14 08:36:29 +01:00
|
|
|
buildInputs = [ ocaml findlib ounit topkg ];
|
2018-01-15 05:01:50 +01:00
|
|
|
propagatedBuildInputs = [ result cstruct zarith ] ++ param.propagatedBuildInputs;
|
2015-02-26 08:33:43 +01:00
|
|
|
|
2017-12-14 08:36:29 +01:00
|
|
|
buildPhase = "${topkg.run} build --tests true";
|
2016-11-13 11:42:42 +01:00
|
|
|
|
2017-12-14 08:36:29 +01:00
|
|
|
inherit (topkg) installPhase;
|
2016-11-13 11:42:42 +01:00
|
|
|
|
2015-06-02 11:54:54 +02:00
|
|
|
doCheck = true;
|
2017-12-14 08:36:29 +01:00
|
|
|
checkPhase = "${topkg.run} test";
|
2015-06-02 11:54:54 +02:00
|
|
|
|
2015-02-26 08:33:43 +01:00
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/mirleft/ocaml-asn1-combinators;
|
|
|
|
description = "Combinators for expressing ASN.1 grammars in OCaml";
|
2016-11-13 11:42:42 +01:00
|
|
|
license = stdenv.lib.licenses.isc;
|
2015-02-26 08:33:43 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
}
|