txt2man: mention runtime dependencies on gawk and coreutils
The commit message in 1a2b47463b
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.
This commit is contained in:
parent
7a5f7dc6a2
commit
440d721915
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, coreutils, gawk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "txt2man-1.5.6";
|
||||
@ -12,6 +12,26 @@ stdenv.mkDerivation rec {
|
||||
makeFlags=prefix="$out"
|
||||
'';
|
||||
|
||||
patchPhase = ''
|
||||
for f in bookman src2man txt2man; do
|
||||
substituteInPlace $f --replace "gawk" "${gawk}/bin/gawk"
|
||||
|
||||
substituteInPlace $f --replace "(date" "(${coreutils}/bin/date"
|
||||
substituteInPlace $f --replace "=cat" "=${coreutils}/bin/cat"
|
||||
substituteInPlace $f --replace "cat <<" "${coreutils}/bin/cat <<"
|
||||
substituteInPlace $f --replace "expand" "${coreutils}/bin/expand"
|
||||
substituteInPlace $f --replace "(uname" "(${coreutils}/bin/uname"
|
||||
done
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
# gawk and coreutils are part of stdenv but will not
|
||||
# necessarily be in PATH at runtime.
|
||||
sh -c 'unset PATH; printf hello | ./txt2man'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Convert flat ASCII text to man page format";
|
||||
homepage = http://mvertes.free.fr/;
|
||||
|
Loading…
Reference in New Issue
Block a user