From 5f6b24a36af63f25ad9c3c09b46cecf8b51ed48f Mon Sep 17 00:00:00 2001 From: Mutsuha Asada Date: Fri, 13 Jun 2025 20:52:56 +0900 Subject: [PATCH] ocamlPackages.dum: 1.0.1 -> 1.0.3 (#414913) * ocamlPackages.dum: 1.0.1 -> 1.0.3 Changelog: https://github.com/mjambon/dum/releases/tag/1.0.3 Diff: https://github.com/mjambon/dum/compare/v1.0.1...1.0.3 * ocamlPackages.dum: modernized derivation - Removed with lib; - Added meta.longDescription - Changed --replace to --replace-fail --- .../development/ocaml-modules/dum/default.nix | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/pkgs/development/ocaml-modules/dum/default.nix b/pkgs/development/ocaml-modules/dum/default.nix index fa41fe11f7c7..679b0c24e357 100644 --- a/pkgs/development/ocaml-modules/dum/default.nix +++ b/pkgs/development/ocaml-modules/dum/default.nix @@ -1,43 +1,38 @@ { lib, - stdenv, - fetchFromGitHub, - ocaml, - findlib, easy-format, + buildDunePackage, + fetchurl, }: -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-dum"; - version = "1.0.1"; +buildDunePackage rec { + pname = "dum"; + version = "1.0.3"; - src = fetchFromGitHub { - owner = "mjambon"; - repo = "dum"; - rev = "v${version}"; - sha256 = "0yrxl97szjc0s2ghngs346x3y0xszx2chidgzxk93frjjpsr1mlr"; + src = fetchurl { + url = "https://github.com/mjambon/dum/releases/download/${version}/dum-${version}.tbz"; + hash = "sha256-ZFojUD/IoxVTDfGyh2wveFsSz4D19pKkHrNuU+LFJlE="; }; postPatch = '' substituteInPlace "dum.ml" \ - --replace "Lazy.lazy_is_val" "Lazy.is_val" \ - --replace "Obj.final_tag" "Obj.custom_tag" + --replace-fail "Lazy.lazy_is_val" "Lazy.is_val" \ + --replace-fail "Obj.final_tag" "Obj.custom_tag" ''; - nativeBuildInputs = [ - ocaml - findlib - ]; propagatedBuildInputs = [ easy-format ]; - strictDeps = true; - - createFindlibDestdir = true; - - meta = with lib; { + meta = { homepage = "https://github.com/mjambon/dum"; description = "Inspect the runtime representation of arbitrary OCaml values"; - license = licenses.lgpl21Plus; - maintainers = [ maintainers.alexfmpe ]; + longDescription = '' + Dum is a library for inspecting the runtime representation of + arbitrary OCaml values. Shared or cyclic data are detected + and labelled. This guarantees that printing would always + terminate. This makes it possible to print values such as closures, + objects or exceptions in depth and without risk. + ''; + license = lib.licenses.lgpl21Plus; + maintainers = with lib.maintainers; [ alexfmpe ]; }; }