about summary refs log tree commit diff
path: root/pkgs/applications/misc/ranger
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2015-08-18 15:41:23 +0000
committerVladimír Čunát <vcunat@gmail.com>2015-11-23 22:24:00 +0100
commitb13c7186d6c840d45c260227ec8c7c79e1877b4b (patch)
treee04bbffe702d787772eea63c21393de748a3937b /pkgs/applications/misc/ranger
parent35fbee79648479b989ed6af6a0feea0d34ed57c5 (diff)
downloadnixlib-b13c7186d6c840d45c260227ec8c7c79e1877b4b.tar
nixlib-b13c7186d6c840d45c260227ec8c7c79e1877b4b.tar.gz
nixlib-b13c7186d6c840d45c260227ec8c7c79e1877b4b.tar.bz2
nixlib-b13c7186d6c840d45c260227ec8c7c79e1877b4b.tar.lz
nixlib-b13c7186d6c840d45c260227ec8c7c79e1877b4b.tar.xz
nixlib-b13c7186d6c840d45c260227ec8c7c79e1877b4b.tar.zst
nixlib-b13c7186d6c840d45c260227ec8c7c79e1877b4b.zip
ranger: fix paths to w3m and share
Picked from #11222.
Diffstat (limited to 'pkgs/applications/misc/ranger')
-rw-r--r--pkgs/applications/misc/ranger/default.nix12
1 files changed, 11 insertions, 1 deletions
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
+  '';
+
 }