about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorMarc Jakobi <mrcjkb89@outlook.com>2022-04-26 13:43:58 +0200
committerGitHub <noreply@github.com>2022-04-26 13:43:58 +0200
commit786a6094962bae771c9f7f085deefd0a7e157876 (patch)
tree3f23638230a33ffcfc170e728aa0a566f5297a7a /pkgs/applications/misc
parent16c42b7c57878e1ade702ffcc4fefbf72b1d6715 (diff)
ranger: add optional python dependencies (#170328)
* ranger: add optional python dependencies

Ranger has some [optional python
dependencies](https://github.com/ranger/ranger#dependencies).
Also, for use with the rnvimr NeoVim plugin, the pynvim packgage needs
to be included.

* Update pkgs/applications/misc/ranger/default.nix

Apply PR suggestion

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Update pkgs/applications/misc/ranger/default.nix

Apply PR suggestion

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Co-authored-by: Marc Jakobi <marc.jakobi@tiko.energy>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/ranger/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix
index 4bd8a182d6f1e..95f85430ba0b5 100644
--- a/pkgs/applications/misc/ranger/default.nix
+++ b/pkgs/applications/misc/ranger/default.nix
@@ -1,5 +1,9 @@
-{ lib, fetchFromGitHub, python3Packages, file, less, highlight
-, imagePreviewSupport ? true, w3m }:
+{ lib, fetchFromGitHub, python3Packages, file, less, highlight, w3m
+, imagePreviewSupport ? true
+, neoVimSupport ? true
+, improvedEncodingDetection ? true
+, rightToLeftTextSupport ? false
+}:
 
 python3Packages.buildPythonApplication rec {
   pname = "ranger";
@@ -15,8 +19,13 @@ python3Packages.buildPythonApplication rec {
   LC_ALL = "en_US.UTF-8";
 
   checkInputs = with python3Packages; [ pytestCheckHook ];
-  propagatedBuildInputs = [ file ]
-    ++ lib.optionals (imagePreviewSupport) [ python3Packages.pillow ];
+  propagatedBuildInputs = [
+    less
+    file
+  ] ++ lib.optionals imagePreviewSupport [ python3Packages.pillow ]
+    ++ lib.optionals neoVimSupport [ python3Packages.pynvim ]
+    ++ lib.optionals improvedEncodingDetection [ python3Packages.chardet ]
+    ++ lib.optionals rightToLeftTextSupport [ python3Packages.python-bidi ];
 
   preConfigure = ''
     ${lib.optionalString (highlight != null) ''