2022-11-21 17:40:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, graphicsmagick, libjpeg
|
2022-01-13 20:06:32 +00:00
|
|
|
, ffmpeg, zlib, libexif, openslide }:
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "timg";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.4.5";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hzeller";
|
|
|
|
repo = "timg";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-YqcPTgStevUkl4grgaOLK8v1vbgFNgc7MfkMB07KDqo=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
buildInputs = [ graphicsmagick ffmpeg libexif libjpeg openslide zlib ];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DTIMG_VERSION_FROM_GIT=Off"
|
|
|
|
"-DWITH_VIDEO_DECODING=On"
|
|
|
|
"-DWITH_VIDEO_DEVICE=On"
|
2022-01-13 20:06:32 +00:00
|
|
|
"-DWITH_OPENSLIDE_SUPPORT=On"
|
2021-04-17 00:35:05 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://timg.sh/";
|
|
|
|
description = "A terminal image and video viewer";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ hzeller ];
|
|
|
|
};
|
|
|
|
}
|