1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{ 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
buildOcaml rec {
name = "asn1-combinators";
inherit (param) version;
minimumSupportedOcamlVersion = "4.01";
src = fetchFromGitHub {
owner = "mirleft";
repo = "ocaml-asn1-combinators";
rev = "v${version}";
inherit (param) sha256;
};
2017-12-14 07:36:29 +00:00
buildInputs = [ ocaml findlib ounit topkg ];
propagatedBuildInputs = [ result cstruct zarith ] ++ param.propagatedBuildInputs;
2017-12-14 07:36:29 +00:00
buildPhase = "${topkg.run} build --tests true";
2017-12-14 07:36:29 +00:00
inherit (topkg) installPhase;
doCheck = true;
2017-12-14 07:36:29 +00:00
checkPhase = "${topkg.run} test";
meta = {
homepage = https://github.com/mirleft/ocaml-asn1-combinators;
description = "Combinators for expressing ASN.1 grammars in OCaml";
license = stdenv.lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
};
}