ctpv: fix img previews and correct dependency (#403288)

authored by Aleksana and committed by GitHub fd44bc6f 6798dbaa

+18
+5
pkgs/by-name/ct/ctpv/package.nix
··· 15 glow, 16 imagemagick, 17 jq, 18 ueberzug, 19 }: 20 ··· 52 glow # for markdown files 53 imagemagick 54 jq # for json files 55 ueberzug # for image files on X11 56 ] 57 }"; 58 ''; 59 60 meta = with lib; { 61 description = "File previewer for a terminal";
··· 15 glow, 16 imagemagick, 17 jq, 18 + poppler-utils, 19 ueberzug, 20 }: 21 ··· 53 glow # for markdown files 54 imagemagick 55 jq # for json files 56 + poppler-utils # for pdf files 57 ueberzug # for image files on X11 58 ] 59 }"; 60 ''; 61 + 62 + # Until https://github.com/NikitaIvanovV/ctpv/pull/90 is merged 63 + patches = [ ./use-polite-flag.patch ]; 64 65 meta = with lib; { 66 description = "File previewer for a terminal";
+13
pkgs/by-name/ct/ctpv/use-polite-flag.patch
···
··· 1 + diff --git a/sh/helpers.sh b/sh/helpers.sh 2 + index fef8691..229d38f 100644 3 + --- a/sh/helpers.sh 4 + +++ b/sh/helpers.sh 5 + @@ -73,7 +73,7 @@ is_anim_image() { 6 + chafa_run() { 7 + format='-f symbols' 8 + autochafa && format= 9 + - chafasixel && format='-f sixels' 10 + + chafasixel && format='-f sixels --polite on' 11 + chafa -s "${w}x${h}" $format "$1" | sed 's/#/\n#/g' 12 + } 13 +