Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions pkgs/tools/misc/lesspipe/default.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses, bash }:
{ lib, stdenv, fetchFromGitHub, substituteAll, makeWrapper, perl, procps, file, gnused, bash }:

stdenv.mkDerivation rec {
pname = "lesspipe";
version = "1.85";
version = "2.05";

nativeBuildInputs = [ perl ];
src = fetchFromGitHub {
owner = "wofr06";
repo = "lesspipe";
rev = "v${version}";
sha256 = "sha256-mRgOndoDpyMnlj/BIoqwpZzuth4eA6yoB2VFZOigRw4=";
};

nativeBuildInputs = [ perl makeWrapper ];
buildInputs = [ perl bash ];
strictDeps = true;
preConfigure = ''

postPatch = ''
patchShebangs --build configure
substituteInPlace configure --replace '/etc/bash_completion.d' '/share/bash-completion/completions'
'';
configureFlags = [ "--shell=${bash}/bin/bash" "--yes" ];
configurePlatforms = [];

configureFlags = [ "--shell=${bash}/bin/bash" "--prefix=/" ];
configurePlatforms = [ ];

dontBuild = true;

src = fetchFromGitHub {
owner = "wofr06";
repo = "lesspipe";
rev = version;
sha256 = "1v1jdkdq1phc93gdr6mjlk98gipxrkkq4bj8kks0kfdvjgdwkdaa";
};
installFlags = [ "DESTDIR=$(out)" ];

patches = [
(substituteAll {
src = ./fix-paths.patch;
file = "${file}/bin/file";
tput = "${ncurses}/bin/tput";
})
./override-shell-detection.patch
];
postInstall = ''
for f in lesspipe.sh lesscomplete; do
wrapProgram "$out/bin/$f" --prefix-each PATH : "${lib.makeBinPath [ file gnused procps ]}"
done
'';

meta = with lib; {
description = "A preprocessor for less";
Expand Down
22 changes: 0 additions & 22 deletions pkgs/tools/misc/lesspipe/fix-paths.patch

This file was deleted.

12 changes: 0 additions & 12 deletions pkgs/tools/misc/lesspipe/override-shell-detection.patch

This file was deleted.