1{ lib, stdenv, fetchFromGitHub, ocaml, findlib
2, easy-format
3}:
4
5stdenv.mkDerivation rec {
6 pname = "ocaml${ocaml.version}-dum";
7 version = "1.0.1";
8
9 src = fetchFromGitHub {
10 owner = "mjambon";
11 repo = "dum";
12 rev = "v${version}";
13 sha256 = "0yrxl97szjc0s2ghngs346x3y0xszx2chidgzxk93frjjpsr1mlr";
14 };
15
16 postPatch = ''
17 substituteInPlace "dum.ml" \
18 --replace "Lazy.lazy_is_val" "Lazy.is_val" \
19 --replace "Obj.final_tag" "Obj.custom_tag"
20 '';
21
22 nativeBuildInputs = [ ocaml findlib ];
23 propagatedBuildInputs = [ easy-format ];
24
25 strictDeps = true;
26
27 createFindlibDestdir = true;
28
29 meta = with lib; {
30 homepage = "https://github.com/mjambon/dum";
31 description = "Inspect the runtime representation of arbitrary OCaml values";
32 license = licenses.lgpl21Plus;
33 maintainers = [ maintainers.alexfmpe ];
34 };
35}