Merge pull request #43985 from snaar/fix-lesspipe-dependency
lesspipe: add missing dependency on 'file'
This commit is contained in:
commit
c5d1f7723b
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, perl }:
|
{ stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "lesspipe-${version}";
|
name = "lesspipe-${version}";
|
||||||
@ -14,6 +14,14 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0vb7bpap8vy003ha10hc7hxl17y47sgdnrjpihgqxkn8k0bfqbbq";
|
sha256 = "0vb7bpap8vy003ha10hc7hxl17y47sgdnrjpihgqxkn8k0bfqbbq";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(substituteAll {
|
||||||
|
src = ./fix-paths.patch;
|
||||||
|
file = "${file}/bin/file";
|
||||||
|
tput = "${ncurses}/bin/tput";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A preprocessor for less";
|
description = "A preprocessor for less";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
22
pkgs/tools/misc/lesspipe/fix-paths.patch
Normal file
22
pkgs/tools/misc/lesspipe/fix-paths.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- a/lesspipe.sh.in
|
||||||
|
+++ b/lesspipe.sh.in
|
||||||
|
@@ -48,8 +48,8 @@ if [[ "$LESS_ADVANCED_PREPROCESSOR" = '' ]]; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
filecmd() {
|
||||||
|
- file -L -s "$@"
|
||||||
|
- file -L -s -i "$@" 2> /dev/null | sed -n 's/.*charset=/;/p' | tr a-z A-Z
|
||||||
|
+ @file@ -L -s "$@"
|
||||||
|
+ @file@ -L -s -i "$@" 2> /dev/null | sed -n 's/.*charset=/;/p' | tr a-z A-Z
|
||||||
|
}
|
||||||
|
|
||||||
|
sep=: # file name separator
|
||||||
|
@@ -546,7 +546,7 @@ isfinal() {
|
||||||
|
|
||||||
|
# color requires -r or -R when calling less
|
||||||
|
typeset COLOR
|
||||||
|
- if [[ $(tput colors) -ge 8 && ("$LESS" = *-*r* || "$LESS" = *-*R*) ]]; then
|
||||||
|
+ if [[ $(@tput@ colors) -ge 8 && ("$LESS" = *-*r* || "$LESS" = *-*R*) ]]; then
|
||||||
|
COLOR="--color=always"
|
||||||
|
fi
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user