diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix index c6bc87ce13d4..5fcb028f0cd9 100644 --- a/pkgs/applications/misc/ranger/default.nix +++ b/pkgs/applications/misc/ranger/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, python, fetchurl }: +{ stdenv, fetchurl, buildPythonPackage, python, w3m }: buildPythonPackage rec { name = "ranger-1.7.1"; @@ -17,4 +17,14 @@ buildPythonPackage rec { }; propagatedBuildInputs = with python.modules; [ curses ]; + + preConfigure = '' + substituteInPlace ranger/ext/img_display.py \ + --replace /usr/lib/w3m ${w3m}/libexec/w3m + + for i in ranger/config/rc.conf doc/config/rc.conf ; do + substituteInPlace $i --replace /usr/share $out/share + done + ''; + }