diff options
author | Alyssa Ross <hi@alyssa.is> | 2018-09-27 18:18:30 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2018-09-27 18:38:26 +0100 |
commit | d152089772b31417cd243c73fb5d5878d7512f7a (patch) | |
tree | 572e40ad0ab2b0a0904123bca411bd2e6b6645be /pkgs/applications/misc/ranger | |
parent | 4f14ccee0779d367390f447e70e99862b441c854 (diff) |
ranger: syntax highlight previews by default
Diffstat (limited to 'pkgs/applications/misc/ranger')
-rw-r--r-- | pkgs/applications/misc/ranger/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix index 26387264b6430..5417a135dda4a 100644 --- a/pkgs/applications/misc/ranger/default.nix +++ b/pkgs/applications/misc/ranger/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, python3Packages, file, less +{ stdenv, lib, fetchFromGitHub, python3Packages, file, less, highlight , imagePreviewSupport ? true, w3m ? null}: with stdenv.lib; @@ -24,6 +24,11 @@ python3Packages.buildPythonApplication rec { ''; preConfigure = '' + ${lib.optionalString (highlight != null) '' + sed -i -e 's|^\s*highlight\b|${highlight}/bin/highlight|' \ + ranger/data/scope.sh + ''} + substituteInPlace ranger/data/scope.sh \ --replace "/bin/echo" "echo" @@ -46,7 +51,7 @@ python3Packages.buildPythonApplication rec { --replace "set preview_images false" "set preview_images true" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "File manager with minimalistic curses interface"; homepage = http://ranger.github.io/; license = licenses.gpl3; |