lesspipe: fix cross-compile (#141028)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
703756c104
commit
51b7f3eac4
|
@ -1,11 +1,18 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses }:
|
{ lib, stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses, bash }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lesspipe";
|
pname = "lesspipe";
|
||||||
version = "1.85";
|
version = "1.85";
|
||||||
|
|
||||||
buildInputs = [ perl ];
|
nativeBuildInputs = [ perl ];
|
||||||
preConfigure = "patchShebangs .";
|
buildInputs = [ perl bash ];
|
||||||
|
strictDeps = true;
|
||||||
|
preConfigure = ''
|
||||||
|
patchShebangs --build configure
|
||||||
|
'';
|
||||||
|
configureFlags = [ "--shell=${bash}/bin/bash" "--yes" ];
|
||||||
|
configurePlatforms = [];
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "wofr06";
|
owner = "wofr06";
|
||||||
|
@ -20,6 +27,7 @@ stdenv.mkDerivation rec {
|
||||||
file = "${file}/bin/file";
|
file = "${file}/bin/file";
|
||||||
tput = "${ncurses}/bin/tput";
|
tput = "${ncurses}/bin/tput";
|
||||||
})
|
})
|
||||||
|
./override-shell-detection.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
12
pkgs/tools/misc/lesspipe/override-shell-detection.patch
Normal file
12
pkgs/tools/misc/lesspipe/override-shell-detection.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -101,7 +101,8 @@
|
||||||
|
open OUT, ">lesspipe.sh.tmp";
|
||||||
|
my $in = 1;
|
||||||
|
my $anyin;
|
||||||
|
-my $shell = check_shell_vers();
|
||||||
|
+my $shell = $opt_shell;
|
||||||
|
+print OUT "#!$shell\n";
|
||||||
|
# ask if syntax highlighting should be included
|
||||||
|
$ifsyntax = '';
|
||||||
|
if ($opt_yes) {
|
Loading…
Reference in a new issue