buildDunePackage: new support function; use it to refactor some OCaml derivations

This commit is contained in:
Théo Zimmermann
2018-11-07 10:08:03 +01:00
parent 5fc73fd52e
commit 794158fcd5
64 changed files with 506 additions and 828 deletions
@@ -1,21 +1,16 @@
{ stdenv, fetchurl, ocaml, ocamlbuild, findlib
, dune, sexplib, ppx_sexp_conv
}:
{ stdenv, fetchurl, buildDunePackage, sexplib, ppx_sexp_conv }:
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-ipaddr-${version}";
buildDunePackage rec {
pname = "ipaddr";
version = "2.8.0";
src = fetchurl {
url = "https://github.com/mirage/ocaml-ipaddr/archive/${version}.tar.gz";
url = "https://github.com/mirage/ocaml-${pname}/archive/${version}.tar.gz";
sha256 = "1amb1pbm9ybpxy6190qygpj6nmbzzs2r6vx4xh5r6v89szx9rfxw";
};
buildInputs = [ ocaml findlib ocamlbuild dune ];
propagatedBuildInputs = [ ppx_sexp_conv sexplib ];
inherit (dune) installPhase;
meta = with stdenv.lib; {
homepage = https://github.com/mirage/ocaml-ipaddr;
description = "A library for manipulation of IP (and MAC) address representations ";