From d84a1526b121a613d9971ec57c59917eaa3e3a16 Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Mon, 5 May 2025 08:09:51 +0200 Subject: [PATCH] texi2html: fix Darwin build, add version check hook --- pkgs/by-name/te/texi2html/package.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/te/texi2html/package.nix b/pkgs/by-name/te/texi2html/package.nix index 5d3a09642116..e96a78cde695 100644 --- a/pkgs/by-name/te/texi2html/package.nix +++ b/pkgs/by-name/te/texi2html/package.nix @@ -4,6 +4,7 @@ fetchurl, perl, gettext, + versionCheckHook, buildPackages, }: @@ -19,21 +20,27 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ + perl + ]; + + buildInputs = [ gettext perl ]; - buildInputs = [ perl ]; postPatch = '' - patchShebangs separated_to_hash.pl + patchShebangs --build separated_to_hash.pl ''; - postInstall = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - for f in $out/bin/*; do - substituteInPlace $f --replace "${buildPackages.perl}" "${perl}" - done + postInstall = '' + patchShebangs --host --update $out/bin/* ''; + doInstallCheck = true; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + meta = with lib; { description = "Perl script which converts Texinfo source files to HTML output"; mainProgram = "texi2html";