From b13c7186d6c840d45c260227ec8c7c79e1877b4b Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Tue, 18 Aug 2015 15:41:23 +0000 Subject: [PATCH] ranger: fix paths to w3m and share Picked from #11222. --- pkgs/applications/misc/ranger/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix index c6bc87ce13d..5fcb028f0cd 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 + ''; + }