Skip to content

Commit d84a152

Browse files
FliegendeWurstyurrriq
authored andcommitted
texi2html: fix Darwin build, add version check hook
1 parent 238a327 commit d84a152

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

pkgs/by-name/te/texi2html/package.nix

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
fetchurl,
55
perl,
66
gettext,
7+
versionCheckHook,
78
buildPackages,
89
}:
910

@@ -19,21 +20,27 @@ stdenv.mkDerivation rec {
1920
strictDeps = true;
2021

2122
nativeBuildInputs = [
23+
perl
24+
];
25+
26+
buildInputs = [
2227
gettext
2328
perl
2429
];
25-
buildInputs = [ perl ];
2630

2731
postPatch = ''
28-
patchShebangs separated_to_hash.pl
32+
patchShebangs --build separated_to_hash.pl
2933
'';
3034

31-
postInstall = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
32-
for f in $out/bin/*; do
33-
substituteInPlace $f --replace "${buildPackages.perl}" "${perl}"
34-
done
35+
postInstall = ''
36+
patchShebangs --host --update $out/bin/*
3537
'';
3638

39+
doInstallCheck = true;
40+
nativeInstallCheckInputs = [
41+
versionCheckHook
42+
];
43+
3744
meta = with lib; {
3845
description = "Perl script which converts Texinfo source files to HTML output";
3946
mainProgram = "texi2html";

0 commit comments

Comments
 (0)