about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix
blob: 43584461af18287f674e353a360f655ba9b9bd7d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, stdenv, fetchFromGitHub, ocaml, findlib
, easy-format
}:

stdenv.mkDerivation rec {
  pname = "ocaml${ocaml.version}-dum";
  version = "1.0.1";

  src = fetchFromGitHub {
    owner = "mjambon";
    repo = "dum";
    rev = "v${version}";
    sha256 = "0yrxl97szjc0s2ghngs346x3y0xszx2chidgzxk93frjjpsr1mlr";
  };

  postPatch = ''
      substituteInPlace "dum.ml" \
      --replace "Lazy.lazy_is_val" "Lazy.is_val" \
      --replace "Obj.final_tag" "Obj.custom_tag"
  '';

  nativeBuildInputs = [ ocaml findlib ];
  propagatedBuildInputs = [ easy-format ];

  strictDeps = true;

  createFindlibDestdir = true;

  meta = with lib; {
    homepage = "https://github.com/mjambon/dum";
    description = "Inspect the runtime representation of arbitrary OCaml values";
    license = licenses.lgpl21Plus;
    maintainers = [ maintainers.alexfmpe ];
  };
}