txt2man: minor cleanups, don't overwrite patchPhase, use makeFlags directly

main
Sandro Jäckel 3 years ago
parent 1d86420916
commit 9bd158f461
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
  1. 30
      pkgs/tools/misc/txt2man/default.nix

@ -11,19 +11,19 @@ stdenv.mkDerivation rec {
hash = "sha256-Aqi5PNNaaM/tr9A/7vKeafYKYIs/kHbwHzE7+R/9r9s=";
};
preConfigure = ''
makeFlags=prefix="$out"
'';
makeFlags = [
"prefix=${placeholder "out"}"
];
patchPhase = ''
postPatch = ''
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"
substituteInPlace $f \
--replace "gawk" "${gawk}/bin/gawk" \
--replace "(date" "(${coreutils}/bin/date" \
--replace "=cat" "=${coreutils}/bin/cat" \
--replace "cat <<" "${coreutils}/bin/cat <<" \
--replace "expand" "${coreutils}/bin/expand" \
--replace "(uname" "(${coreutils}/bin/uname"
done
'';
@ -35,11 +35,11 @@ stdenv.mkDerivation rec {
sh -c 'unset PATH; printf hello | ./txt2man'
'';
meta = {
meta = with lib; {
description = "Convert flat ASCII text to man page format";
homepage = "http://mvertes.free.fr/";
license = lib.licenses.gpl2;
platforms = with lib.platforms; linux ++ darwin;
maintainers = with lib.maintainers; [ bjornfor ];
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor ];
};
}

Loading…
Cancel
Save