diff options
author | zendo <linzway@qq.com> | 2023-03-28 11:38:05 +0800 |
---|---|---|
committer | zendo <linzway@qq.com> | 2023-03-28 11:42:10 +0800 |
commit | e700b7ab98d9fe1385b8dec2fd2120a18601c142 (patch) | |
tree | 625d71ca01c66c487132a01c18e3ce3f54fbaa76 /pkgs/applications/file-managers | |
parent | e3eeeecadd5e6ef055a83c5eaed8a660b5b464dd (diff) |
ctpv: 1.0 -> 1.1
Diffstat (limited to 'pkgs/applications/file-managers')
-rw-r--r-- | pkgs/applications/file-managers/lf/ctpv.nix | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/pkgs/applications/file-managers/lf/ctpv.nix b/pkgs/applications/file-managers/lf/ctpv.nix index 36a01078831af..d1e4a6633730b 100644 --- a/pkgs/applications/file-managers/lf/ctpv.nix +++ b/pkgs/applications/file-managers/lf/ctpv.nix @@ -1,38 +1,61 @@ { lib -, pkgs -, file -, openssl , stdenv , fetchFromGitHub -, waylandSupport ? stdenv.isLinux -, x11Support ? stdenv.isLinux +, makeWrapper +, file +, openssl +, atool +, bat +, chafa +, delta +, ffmpeg +, ffmpegthumbnailer +, fontforge +, glow +, imagemagick +, jq +, ueberzug }: stdenv.mkDerivation rec { pname = "ctpv"; - version = "1.0"; + version = "1.1"; src = fetchFromGitHub { owner = "NikitaIvanovV"; - repo = "${pname}"; + repo = pname; rev = "v${version}"; - hash = "sha256-0OuskRCBVm8vMd2zH5u5EPABmCOlEv5N4ZZMdc7bAwM="; + hash = "sha256-3BQi4m44hBmPkJBFNCg6d9YKRbDZwLxdzBb/NDWTQP4="; }; - nativeBuildInputs = [ + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ file # libmagic openssl ]; - buildInputs = with pkgs; [ - ffmpegthumbnailer ffmpeg - ] ++ lib.optionals waylandSupport [ chafa ] - ++ lib.optionals x11Support [ ueberzug ]; - makeFlags = [ "PREFIX=$(out)" ]; + preFixup = '' + wrapProgram $out/bin/ctpv \ + --prefix PATH ":" "${lib.makeBinPath [ + atool # for archive files + bat + chafa # for image files on Wayland + delta # for diff files + ffmpeg + ffmpegthumbnailer + fontforge + glow # for markdown files + imagemagick + jq # for json files + ueberzug # for image files on X11 + ]}"; + ''; + meta = with lib; { - description = "Image previews for lf (list files) file manager"; + description = "File previewer for a terminal"; homepage = "https://github.com/NikitaIvanovV/ctpv"; license = licenses.mit; platforms = platforms.linux; |