Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

txt2man: mention runtime dependencies on gawk and coreutils

The commit message in 1a2b47463b45c2b05ec80ade28781afc986576af is
incorrect -- the package seemed to work because only the help message
was invoked:

result/bin/txt2man -h

To guard against such trivial successes, this commit introduces a
test.

authored by Manav Rathi and committed by Bjørn Forsman 440d7219 7a5f7dc6

+22 -2
+22 -2
pkgs/tools/misc/txt2man/default.nix
··· 1 - { stdenv, fetchurl }: 1 + { stdenv, fetchurl, coreutils, gawk }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "txt2man-1.5.6"; ··· 12 12 makeFlags=prefix="$out" 13 13 ''; 14 14 15 - meta = { 15 + patchPhase = '' 16 + for f in bookman src2man txt2man; do 17 + substituteInPlace $f --replace "gawk" "${gawk}/bin/gawk" 18 + 19 + substituteInPlace $f --replace "(date" "(${coreutils}/bin/date" 20 + substituteInPlace $f --replace "=cat" "=${coreutils}/bin/cat" 21 + substituteInPlace $f --replace "cat <<" "${coreutils}/bin/cat <<" 22 + substituteInPlace $f --replace "expand" "${coreutils}/bin/expand" 23 + substituteInPlace $f --replace "(uname" "(${coreutils}/bin/uname" 24 + done 25 + ''; 26 + 27 + doCheck = true; 28 + 29 + checkPhase = '' 30 + # gawk and coreutils are part of stdenv but will not 31 + # necessarily be in PATH at runtime. 32 + sh -c 'unset PATH; printf hello | ./txt2man' 33 + ''; 34 + 35 + meta = { 16 36 description = "Convert flat ASCII text to man page format"; 17 37 homepage = http://mvertes.free.fr/; 18 38 license = stdenv.lib.licenses.gpl2;