lol

po4a: formatting cleanup

linsui b7ef78ce 740610b8

+61 -8
+61 -8
pkgs/development/perl-modules/Po4a/default.nix
··· 1 - { stdenv, lib, fetchurl, docbook_xsl, docbook_xsl_ns, gettext, libxslt, glibcLocales, docbook_xml_dtd_412, docbook_sgml_dtd_41, opensp, bash 2 - , perl, buildPerlPackage, ModuleBuild, TextWrapI18N, LocaleGettext, TermReadKey, SGMLSpm, UnicodeLineBreak, PodParser, YAMLTiny 3 - , fetchpatch, writeShellScriptBin 1 + { stdenv 2 + , lib 3 + , fetchurl 4 + , docbook_xsl 5 + , docbook_xsl_ns 6 + , gettext 7 + , libxslt 8 + , glibcLocales 9 + , docbook_xml_dtd_412 10 + , docbook_sgml_dtd_41 11 + , opensp 12 + , bash 13 + , perl 14 + , buildPerlPackage 15 + , ModuleBuild 16 + , TextWrapI18N 17 + , LocaleGettext 18 + , SGMLSpm 19 + , UnicodeLineBreak 20 + , PodParser 21 + , YAMLTiny 22 + , fetchpatch 23 + , writeShellScriptBin 4 24 }: 5 25 6 26 buildPerlPackage rec { 7 27 pname = "po4a"; 8 28 version = "0.62"; 29 + 9 30 src = fetchurl { 10 31 url = "https://github.com/mquinson/po4a/releases/download/v${version}/po4a-${version}.tar.gz"; 11 32 sha256 = "0eb510a66f59de68cf7a205342036cc9fc08b39334b91f1456421a5f3359e68b"; 12 33 }; 34 + 13 35 patches = [ 14 36 (fetchpatch { 15 37 # make devdoc output reproducible ··· 20 42 ]; 21 43 22 44 strictDeps = true; 45 + 23 46 nativeBuildInputs = 24 47 # the tests for the tex-format use kpsewhich -- texlive's file finding utility. 25 48 # We don't want to depend on texlive here, so we replace it with a minimal 26 49 # shellscript that suffices for the tests in t/fmt/tex/, i.e. it looks up 27 50 # article.cls to an existing file, but doesn't find article-wrong.cls. 28 - let kpsewhich-stub = writeShellScriptBin "kpsewhich" 29 - ''[[ $1 = "article.cls" ]] && echo /dev/null''; 51 + let 52 + kpsewhich-stub = writeShellScriptBin "kpsewhich" 53 + ''[[ $1 = "article.cls" ]] && echo /dev/null''; 30 54 in 31 - [ gettext libxslt docbook_xsl docbook_xsl_ns ModuleBuild docbook_xml_dtd_412 docbook_sgml_dtd_41 opensp kpsewhich-stub glibcLocales ]; 32 - propagatedBuildInputs = lib.optional (!stdenv.hostPlatform.isMusl) TextWrapI18N ++ [ LocaleGettext SGMLSpm UnicodeLineBreak PodParser YAMLTiny ]; 55 + [ 56 + gettext 57 + libxslt 58 + docbook_xsl 59 + docbook_xsl_ns 60 + ModuleBuild 61 + docbook_xml_dtd_412 62 + docbook_sgml_dtd_41 63 + opensp 64 + kpsewhich-stub 65 + glibcLocales 66 + ]; 67 + 33 68 # TODO: TermReadKey was temporarily removed from propagatedBuildInputs to unfreeze the build 69 + propagatedBuildInputs = lib.optionals (!stdenv.hostPlatform.isMusl) [ 70 + TextWrapI18N 71 + ] ++ [ 72 + LocaleGettext 73 + SGMLSpm 74 + UnicodeLineBreak 75 + PodParser 76 + YAMLTiny 77 + ]; 78 + 34 79 buildInputs = [ bash ]; 80 + 35 81 LC_ALL = "en_US.UTF-8"; 36 82 SGML_CATALOG_FILES = "${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml"; 83 + 37 84 preConfigure = '' 38 85 touch Makefile.PL 39 86 export PERL_MB_OPT="--install_base=$out --prefix=$out" 40 87 ''; 41 - buildPhase = "perl Build.PL --install_base=$out --install_path=\"lib=$out/${perl.libPrefix}\"; ./Build build"; 88 + 89 + buildPhase = '' 90 + perl Build.PL --install_base=$out --install_path="lib=$out/${perl.libPrefix}" 91 + ./Build build 92 + ''; 42 93 43 94 # Disabling tests on musl 44 95 # Void linux package have investigated the failure and tracked it down to differences in gettext behavior. They decided to disable tests. ··· 53 104 export SGML_CATALOG_FILES=${docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat 54 105 ./Build test 55 106 ''; 107 + 56 108 installPhase = '' 57 109 ./Build install 58 110 for f in $out/bin/*; do 59 111 substituteInPlace $f --replace "#! /usr/bin/env perl" "#!${perl}/bin/perl" 60 112 done 61 113 ''; 114 + 62 115 meta = { 63 116 description = "Tools for helping translation of documentation"; 64 117 homepage = "https://po4a.org";