summary refs log tree commit diff
path: root/pkgs/applications/misc/ranger
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/ranger')
-rw-r--r--pkgs/applications/misc/ranger/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix
index 3334daa4aed..0a32fdf748e 100644
--- a/pkgs/applications/misc/ranger/default.nix
+++ b/pkgs/applications/misc/ranger/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pythonPackages, w3m, file }:
+{ stdenv, fetchurl, pythonPackages, w3m, file, less }:
 
 pythonPackages.buildPythonApplication rec {
   name = "ranger-1.7.2";
@@ -20,6 +20,8 @@ pythonPackages.buildPythonApplication rec {
   preConfigure = ''
     substituteInPlace ranger/ext/img_display.py \
       --replace /usr/lib/w3m ${w3m}/libexec/w3m
+    substituteInPlace ranger/__init__.py \
+      --replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${stdenv.lib.getBin less}/bin/less'"
 
     for i in ranger/config/rc.conf doc/config/rc.conf ; do
       substituteInPlace $i --replace /usr/share $out/share