Commit d84a1526 authored by FliegendeWurst's avatar FliegendeWurst Committed by Eric Bailey
Browse files

texi2html: fix Darwin build, add version check hook

parent 238a3277
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -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";