diff options
Diffstat (limited to 'pkgs/development/tools/misc/texi2html/default.nix')
-rw-r--r-- | pkgs/development/tools/misc/texi2html/default.nix | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/development/tools/misc/texi2html/default.nix b/pkgs/development/tools/misc/texi2html/default.nix index 755bfcd7274..98f846b7c2f 100644 --- a/pkgs/development/tools/misc/texi2html/default.nix +++ b/pkgs/development/tools/misc/texi2html/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl, gettext }: +{ lib, stdenv, fetchurl, perl, gettext, buildPackages }: stdenv.mkDerivation rec { pname = "texi2html"; @@ -9,15 +9,22 @@ stdenv.mkDerivation rec { sha256 = "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"; }; - nativeBuildInputs = [ gettext ]; + strictDeps = true; + + nativeBuildInputs = [ gettext perl ]; buildInputs = [ perl ]; - preBuild = '' - substituteInPlace separated_to_hash.pl \ - --replace "/usr/bin/perl" "${perl}/bin/perl" + postPatch = '' + patchShebangs separated_to_hash.pl + ''; + + postInstall = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + for f in $out/bin/*; do + substituteInPlace $f --replace "${buildPackages.perl}" "${perl}" + done ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Perl script which converts Texinfo source files to HTML output"; homepage = "https://www.nongnu.org/texi2html/"; license = licenses.gpl2; |