From 0fc86dedef9b66f1ceb0cdbe6cecc8683134a911 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Mon, 14 Sep 2026 18:22:18 +0800 Subject: [PATCH] ledit: fix broken executable Prior to this change ledit failed with a 127 exit code: $ ledit no bytecode file specified $ echo hello | ledit cat the file 'cat' has not the right magic number: expected Caml1999X036 Upstream builds ledit with `ocamlc -custom`, which attaches the program to the end of the executable. Stripping drops it again. With dontStrip the program stays in place: $ echo hello | ledit cat hello hello Signed-off-by: Matthias J. Kannwischer --- pkgs/by-name/le/ledit/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/le/ledit/package.nix b/pkgs/by-name/le/ledit/package.nix index c2b2d7728441..3527dfa1c25e 100644 --- a/pkgs/by-name/le/ledit/package.nix +++ b/pkgs/by-name/le/ledit/package.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation { strictDeps = true; + dontStrip = true; + nativeBuildInputs = with ocamlPackages; [ ocaml findlib @@ -33,6 +35,15 @@ stdenv.mkDerivation { camlp-streams ]; + doInstallCheck = true; + + installCheckPhase = '' + runHook preInstallCheck + echo hello | $out/bin/ledit -h /dev/null cat > ledit-check.out + grep -q hello ledit-check.out + runHook postInstallCheck + ''; + meta = { homepage = "http://pauillac.inria.fr/~ddr/ledit/"; description = "Line editor, allowing to use shell commands with control characters like in emacs";