Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
73 lines
1.4 KiB
Nix
73 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
file,
|
|
openssl,
|
|
atool,
|
|
bat,
|
|
chafa,
|
|
delta,
|
|
ffmpeg,
|
|
ffmpegthumbnailer,
|
|
fontforge,
|
|
glow,
|
|
imagemagick,
|
|
jq,
|
|
poppler-utils,
|
|
ueberzug,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ctpv";
|
|
version = "1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "NikitaIvanovV";
|
|
repo = "ctpv";
|
|
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
|
|
poppler-utils # for pdf files
|
|
ueberzug # for image files on X11
|
|
]
|
|
}";
|
|
'';
|
|
|
|
# Until https://github.com/NikitaIvanovV/ctpv/pull/90 is merged
|
|
patches = [ ./use-polite-flag.patch ];
|
|
|
|
meta = with lib; {
|
|
description = "File previewer for a terminal";
|
|
homepage = "https://github.com/NikitaIvanovV/ctpv";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.wesleyjrz ];
|
|
};
|
|
}
|