diff options
Diffstat (limited to 'pkgs/development/ocaml-modules/cstruct/default.nix')
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/default.nix | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/cstruct/default.nix b/pkgs/development/ocaml-modules/cstruct/default.nix index 1a5a992f2be..c3941173bff 100644 --- a/pkgs/development/ocaml-modules/cstruct/default.nix +++ b/pkgs/development/ocaml-modules/cstruct/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchurl, ocaml, dune, findlib, sexplib, ocplib-endian }: +{ stdenv, fetchurl, buildDunePackage, sexplib, ocplib-endian }: -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-cstruct-${version}"; +buildDunePackage rec { + pname = "cstruct"; version = "3.1.1"; + src = fetchurl { url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-${version}.tbz"; sha256 = "1x4jxsvd1lrfibnjdjrkfl7hqsc48rljnwbap6faanj9qhwwa6v2"; @@ -10,19 +11,12 @@ stdenv.mkDerivation rec { unpackCmd = "tar -xjf $curSrc"; - buildInputs = [ ocaml dune findlib ]; - propagatedBuildInputs = [ sexplib ocplib-endian ]; - buildPhase = "dune build -p cstruct"; - - inherit (dune) installPhase; - meta = { description = "Access C-like structures directly from OCaml"; license = stdenv.lib.licenses.isc; homepage = "https://github.com/mirage/ocaml-cstruct"; maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; }; } |