3
0
Fork 0
forked from mirrors/nixpkgs

ocaml-asn1-combinators: 0.1.2 -> 0.1.3

This update relicenses the project to ISC and fixes the test bug, which broke the package on 32-bit platforms
This commit is contained in:
sternenseemann 2016-11-13 11:42:42 +01:00
parent e2ac66f118
commit d65368ad28

View file

@ -1,32 +1,39 @@
{ stdenv, fetchzip, ocaml, findlib, cstruct, zarith, ounit }: { stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, zarith, ounit, result, topkg, opam }:
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"; let ocamlFlags = "-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/"; in
let version = "0.1.2"; in buildOcaml rec {
name = "asn1-combinators";
version = "0.1.3";
stdenv.mkDerivation { minimumSupportedOcamlVersion = "4.01";
name = "ocaml-asn1-combinators-${version}";
src = fetchzip { src = fetchFromGitHub {
url = "https://github.com/mirleft/ocaml-asn1-combinators/archive/${version}.tar.gz"; owner = "mirleft";
sha256 = "13vpdgcyph4vq3gcp8b16756s4nz3crpxhxfhcqgc1ffz61gc0h5"; repo = "ocaml-asn1-combinators";
rev = "v${version}";
sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj";
}; };
buildInputs = [ ocaml findlib ounit ]; buildInputs = [ ocaml findlib ounit topkg opam ];
propagatedBuildInputs = [ cstruct zarith ]; propagatedBuildInputs = [ result cstruct zarith ];
createFindlibDestdir = true; createFindlibDestdir = true;
configureFlags = "--enable-tests"; buildPhase = "ocaml ${ocamlFlags} pkg/pkg.ml build --tests true";
installPhase = ''
opam-installer --script --prefix=$out | sh
ln -s $out/lib/asn1-combinators $out/lib/ocaml/${ocaml.version}/site-lib
'';
doCheck = true; doCheck = true;
checkTarget = "test"; checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test";
meta = { meta = {
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";
platforms = ocaml.meta.platforms or []; license = stdenv.lib.licenses.isc;
license = stdenv.lib.licenses.bsd2;
maintainers = with stdenv.lib.maintainers; [ vbgl ]; maintainers = with stdenv.lib.maintainers; [ vbgl ];
broken = stdenv.isi686; # https://github.com/mirleft/ocaml-asn1-combinators/issues/13
}; };
} }