ranger: syntax highlight previews by default

This commit is contained in:
Alyssa Ross 2018-09-27 18:18:30 +01:00
parent 4f14ccee07
commit d152089772
No known key found for this signature in database
GPG key ID: C4844408C0657052

View file

@ -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;