Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
coreutils,
|
|
gawk,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "txt2man";
|
|
version = "1.7.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mvertes";
|
|
repo = "txt2man";
|
|
rev = "txt2man-${version}";
|
|
hash = "sha256-Aqi5PNNaaM/tr9A/7vKeafYKYIs/kHbwHzE7+R/9r9s=";
|
|
};
|
|
|
|
makeFlags = [
|
|
"prefix=${placeholder "out"}"
|
|
];
|
|
|
|
postPatch = ''
|
|
for f in bookman src2man txt2man; do
|
|
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
|
|
'';
|
|
|
|
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 = with lib; {
|
|
description = "Convert flat ASCII text to man page format";
|
|
homepage = "http://mvertes.free.fr/";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
};
|
|
}
|