diff options
author | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-11-05 11:21:46 +0100 |
---|---|---|
committer | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-11-07 10:08:03 +0100 |
commit | 794158fcd54b862f3775bc8b54495a842a250b7b (patch) | |
tree | 333ef218a45bf9ca5d20186dc67bb9bd5209aca3 /pkgs/development/ocaml-modules/mstruct | |
parent | 5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff) | |
download | nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.gz nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.bz2 nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.lz nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.xz nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.zst nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.zip |
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/mstruct')
-rw-r--r-- | pkgs/development/ocaml-modules/mstruct/default.nix | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/pkgs/development/ocaml-modules/mstruct/default.nix b/pkgs/development/ocaml-modules/mstruct/default.nix index 9184975f0698..ae26f879ef8c 100644 --- a/pkgs/development/ocaml-modules/mstruct/default.nix +++ b/pkgs/development/ocaml-modules/mstruct/default.nix @@ -1,33 +1,24 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, dune -, cstruct -}: +{ stdenv, fetchFromGitHub, buildDunePackage, cstruct }: -if !stdenv.lib.versionAtLeast ocaml.version "4.02" -then throw "mstruct is not available for OCaml ${ocaml.version}" -else - -stdenv.mkDerivation rec { +buildDunePackage rec { + pname = "mstruct"; version = "1.4.0"; - name = "ocaml${ocaml.version}-mstruct-${version}"; + + minimumOCamlVersion = "4.02"; src = fetchFromGitHub { owner = "mirage"; - repo = "ocaml-mstruct"; + repo = "ocaml-${pname}"; rev = "v${version}"; sha256 = "1p4ygwzs3n1fj4apfib0z0sabpph21bkq1dgjk4bsa59pq4prncm"; }; - buildInputs = [ ocaml findlib dune ]; - propagatedBuildInputs = [ cstruct ]; - inherit (dune) installPhase; - meta = { description = "A thin mutable layer on top of cstruct"; license = stdenv.lib.licenses.isc; maintainers = [ stdenv.lib.maintainers.vbgl ]; inherit (src.meta) homepage; - inherit (ocaml.meta) platforms; }; } |