depot/pkgs/applications/file-managers/lf/ctpv.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

64 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, file
, openssl
, atool
, bat
, chafa
, delta
, ffmpeg
, ffmpegthumbnailer
, fontforge
, glow
, imagemagick
, jq
, ueberzug
}:
stdenv.mkDerivation rec {
pname = "ctpv";
version = "1.1";
src = fetchFromGitHub {
owner = "NikitaIvanovV";
repo = pname;
rev = "v${version}";
hash = "sha256-3BQi4m44hBmPkJBFNCg6d9YKRbDZwLxdzBb/NDWTQP4=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
file # libmagic
openssl
];
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 = "File previewer for a terminal";
homepage = "https://github.com/NikitaIvanovV/ctpv";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.wesleyjrz ];
};
}