uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
45
pkgs/tools/misc/txt2man/default.nix
Normal file
45
pkgs/tools/misc/txt2man/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub, coreutils, gawk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "txt2man";
|
||||
version = "1.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mvertes";
|
||||
repo = "txt2man";
|
||||
rev = "${pname}-${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.gpl2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue