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,23 +1,19 @@
{ stdenv, fetchzip, ocaml, findlib, dune, configurator, cstruct }:
{ stdenv, fetchzip, buildDunePackage, configurator, cstruct }:
let version = "2.0.1"; in
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-io-page-${version}";
buildDunePackage rec {
pname = "io-page";
version = "2.0.1";
src = fetchzip {
url = "https://github.com/mirage/io-page/archive/${version}.tar.gz";
url = "https://github.com/mirage/${pname}/archive/${version}.tar.gz";
sha256 = "1rw04dwrlx5hah5dkjf7d63iff82j9cifr8ifjis5pdwhgwcff8i";
};
buildInputs = [ ocaml findlib dune configurator ];
buildInputs = [ configurator ];
propagatedBuildInputs = [ cstruct ];
inherit (dune) installPhase;
meta = {
homepage = https://github.com/mirage/io-page;
inherit (ocaml.meta) platforms;
license = stdenv.lib.licenses.isc;
description = "IO memory page library for Mirage backends";
maintainers = with stdenv.lib.maintainers; [ vbgl ];