buildDunePackage: new support function; use it to refactor some OCaml derivations
This commit is contained in:
@@ -1,31 +1,22 @@
|
||||
{ stdenv, fetchFromGitHub, ocaml, findlib, dune
|
||||
, ppx_tools_versioned
|
||||
, ounit
|
||||
}:
|
||||
{ stdenv, fetchFromGitHub, buildDunePackage, ppx_tools_versioned, ounit }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ocaml${ocaml.version}-bitstring-${version}";
|
||||
buildDunePackage rec {
|
||||
pname = "bitstring";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xguerin";
|
||||
repo = "bitstring";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0r49qax7as48jgknzaq6p9rbpmrvnmlic713wzz5bj60j5h0396f";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml findlib dune ppx_tools_versioned ounit ];
|
||||
|
||||
buildPhase = "jbuilder build";
|
||||
|
||||
buildInputs = [ ppx_tools_versioned ounit ];
|
||||
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 ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user