diff --git a/pkgs/development/perl-modules/Po4a/default.nix b/pkgs/development/perl-modules/Po4a/default.nix index 1fae36dfcb777a..6ade7ddce4d8bd 100644 --- a/pkgs/development/perl-modules/Po4a/default.nix +++ b/pkgs/development/perl-modules/Po4a/default.nix @@ -89,8 +89,10 @@ buildPerlPackage rec { ''; buildPhase = '' + runHook preBuild perl Build.PL --install_base=$out --install_path="lib=$out/${perl.libPrefix}" ./Build build + runHook postBuild ''; # Disabling tests on musl @@ -103,21 +105,31 @@ buildPerlPackage rec { doCheck = (!stdenv.hostPlatform.isMusl) && (!stdenv.hostPlatform.isDarwin); checkPhase = '' + runHook preCheck export SGML_CATALOG_FILES=${docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat ./Build test + runHook postCheck ''; installPhase = '' + runHook preInstall ./Build install for f in $out/bin/*; do substituteInPlace $f --replace "#! /usr/bin/env perl" "#!${perl}/bin/perl" substituteInPlace $f --replace "exec perl" "exec ${perl}/bin/perl" done + runHook postInstall + ''; + + postFixup = '' + wrapProgram $out/bin/po4a \ + --prefix PATH : ${lib.makeBinPath [ gettext ]} ''; meta = { description = "Tools for helping translation of documentation"; homepage = "https://po4a.org"; license = with lib.licenses; [ gpl2Plus ]; + mainProgram = "po4a"; }; }