diff options
author | Tim Steinbach <NeQuissimus@users.noreply.github.com> | 2016-11-17 22:21:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 22:21:44 -0500 |
commit | d0695c7877137028bc9fa91176af81603145e7d0 (patch) | |
tree | 26606aecd3b1907f0740ff987bf9d08c2d58a89b /pkgs/development/ocaml-modules | |
parent | 80ec5b3f58fd19ef939e8fc0cc28468e3d9368c1 (diff) | |
parent | d65368ad28b93a0442e37dd8703fa2b3192ce95a (diff) | |
download | nixpkgs-d0695c7877137028bc9fa91176af81603145e7d0.tar nixpkgs-d0695c7877137028bc9fa91176af81603145e7d0.tar.gz nixpkgs-d0695c7877137028bc9fa91176af81603145e7d0.tar.bz2 nixpkgs-d0695c7877137028bc9fa91176af81603145e7d0.tar.lz nixpkgs-d0695c7877137028bc9fa91176af81603145e7d0.tar.xz nixpkgs-d0695c7877137028bc9fa91176af81603145e7d0.tar.zst nixpkgs-d0695c7877137028bc9fa91176af81603145e7d0.zip |
Merge pull request #20378 from sternenseemann/asn1
ocaml-asn1-combinators: 0.1.2 -> 0.1.3
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/asn1-combinators/default.nix | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/pkgs/development/ocaml-modules/asn1-combinators/default.nix b/pkgs/development/ocaml-modules/asn1-combinators/default.nix index 544db9e0d78..feeb94a5c46 100644 --- a/pkgs/development/ocaml-modules/asn1-combinators/default.nix +++ b/pkgs/development/ocaml-modules/asn1-combinators/default.nix @@ -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 { - name = "ocaml-asn1-combinators-${version}"; + minimumSupportedOcamlVersion = "4.01"; - src = fetchzip { - url = "https://github.com/mirleft/ocaml-asn1-combinators/archive/${version}.tar.gz"; - sha256 = "13vpdgcyph4vq3gcp8b16756s4nz3crpxhxfhcqgc1ffz61gc0h5"; + src = fetchFromGitHub { + owner = "mirleft"; + repo = "ocaml-asn1-combinators"; + rev = "v${version}"; + sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj"; }; - buildInputs = [ ocaml findlib ounit ]; - propagatedBuildInputs = [ cstruct zarith ]; + buildInputs = [ ocaml findlib ounit topkg opam ]; + propagatedBuildInputs = [ result cstruct zarith ]; 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; - checkTarget = "test"; + checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test"; meta = { homepage = https://github.com/mirleft/ocaml-asn1-combinators; description = "Combinators for expressing ASN.1 grammars in OCaml"; - platforms = ocaml.meta.platforms or []; - license = stdenv.lib.licenses.bsd2; + license = stdenv.lib.licenses.isc; maintainers = with stdenv.lib.maintainers; [ vbgl ]; - broken = stdenv.isi686; # https://github.com/mirleft/ocaml-asn1-combinators/issues/13 }; } |