aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/ocaml-modules/io-page
diff options
context:
space:
mode:
authorThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-05 11:21:46 +0100
committerThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-07 10:08:03 +0100
commit794158fcd54b862f3775bc8b54495a842a250b7b (patch)
tree333ef218a45bf9ca5d20186dc67bb9bd5209aca3 /pkgs/development/ocaml-modules/io-page
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/io-page')
-rw-r--r--pkgs/development/ocaml-modules/io-page/default.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/io-page/default.nix b/pkgs/development/ocaml-modules/io-page/default.nix
index 7c3d3a20c4d7..e0f024569626 100644
--- a/pkgs/development/ocaml-modules/io-page/default.nix
+++ b/pkgs/development/ocaml-modules/io-page/default.nix
@@ -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 ];