ed68a9d5f8
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. This update was made based on information from https://repology.org/metapackage/txt2man/versions. These checks were done: - built on NixOS - ran `/nix/store/vydx2fidxsxrqm9kanw76gbb8fp4imaz-txt2man-1.6.0/bin/src2man -h` got 0 exit code - ran `/nix/store/vydx2fidxsxrqm9kanw76gbb8fp4imaz-txt2man-1.6.0/bin/src2man --help` got 0 exit code - ran `/nix/store/vydx2fidxsxrqm9kanw76gbb8fp4imaz-txt2man-1.6.0/bin/bookman -h` got 0 exit code - ran `/nix/store/vydx2fidxsxrqm9kanw76gbb8fp4imaz-txt2man-1.6.0/bin/bookman --help` got 0 exit code - ran `/nix/store/vydx2fidxsxrqm9kanw76gbb8fp4imaz-txt2man-1.6.0/bin/txt2man -h` got 0 exit code - ran `/nix/store/vydx2fidxsxrqm9kanw76gbb8fp4imaz-txt2man-1.6.0/bin/txt2man --help` got 0 exit code - ran `/nix/store/vydx2fidxsxrqm9kanw76gbb8fp4imaz-txt2man-1.6.0/bin/txt2man help` got 0 exit code - directory tree listing: https://gist.github.com/ae0f9873f1dd72fc8e50875212ed15b3
44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
{ stdenv, fetchurl, coreutils, gawk }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "txt2man-${version}";
|
|
version = "1.6.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/mvertes/txt2man/archive/${name}.tar.gz";
|
|
sha256 = "168cj96974n2z0igin6j1ic1m45zyic7nm5ark7frq8j78rrx4zn";
|
|
};
|
|
|
|
preConfigure = ''
|
|
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/;
|
|
license = stdenv.lib.licenses.gpl2;
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
|
maintainers = with stdenv.lib.maintainers; [ bjornfor ];
|
|
};
|
|
}
|