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