lesspipe: fix cross-compile (#141028)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
main
Kaz Wesley 3 years ago committed by GitHub
parent 703756c104
commit 51b7f3eac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      pkgs/tools/misc/lesspipe/default.nix
  2. 12
      pkgs/tools/misc/lesspipe/override-shell-detection.patch

@ -1,11 +1,18 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses }:
{ lib, stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses, bash }:
stdenv.mkDerivation rec {
pname = "lesspipe";
version = "1.85";
buildInputs = [ perl ];
preConfigure = "patchShebangs .";
nativeBuildInputs = [ perl ];
buildInputs = [ perl bash ];
strictDeps = true;
preConfigure = ''
patchShebangs --build configure
'';
configureFlags = [ "--shell=${bash}/bin/bash" "--yes" ];
configurePlatforms = [];
dontBuild = true;
src = fetchFromGitHub {
owner = "wofr06";
@ -20,6 +27,7 @@ stdenv.mkDerivation rec {
file = "${file}/bin/file";
tput = "${ncurses}/bin/tput";
})
./override-shell-detection.patch
];
meta = with lib; {

@ -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…
Cancel
Save