summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/bitstring/default.nix
blob: 93bcb3cb1e99ae322fd593312af92b33449d6df8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchFromGitHub, ocaml, findlib, dune
, ppx_tools_versioned
, ounit
}:

stdenv.mkDerivation rec {
  name = "ocaml${ocaml.version}-bitstring-${version}";
  version = "3.0.0";
  src = fetchFromGitHub {
    owner = "xguerin";
    repo = "bitstring";
    rev = "v${version}";
    sha256 = "0r49qax7as48jgknzaq6p9rbpmrvnmlic713wzz5bj60j5h0396f";
  };

  buildInputs = [ ocaml findlib dune ppx_tools_versioned ounit ];

  buildPhase = "jbuilder build";

  doCheck = true;
  checkPhase = "jbuilder runtest";

  inherit (dune) installPhase;

  meta = with stdenv.lib; {
    description = "This library adds Erlang-style bitstrings and matching over bitstrings as a syntax extension and library for OCaml";
    homepage = https://github.com/xguerin/bitstring;
    inherit (ocaml.meta) platforms;
    license = licenses.lgpl21Plus;
    maintainers = [ maintainers.maurer ];
  };
}