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,12 +1,10 @@
{ stdenv, ocaml, cstruct, lwt }:
{ buildDunePackage, cstruct, lwt }:
assert stdenv.lib.versionAtLeast ocaml.version "4.02";
buildDunePackage {
pname = "cstruct-lwt";
inherit (cstruct) version src unpackCmd meta;
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-cstruct-lwt-${version}";
inherit (cstruct) version src unpackCmd buildInputs installPhase meta;
minimumOCamlVersion = "4.02";
propagatedBuildInputs = [ cstruct lwt ];
buildPhase = "${cstruct.buildPhase}-lwt";
}