2021-04-14 06:51:55 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, graphicsmagick, libjpeg
|
2022-01-08 20:10:41 +00:00
|
|
|
, ffmpeg, zlib, libexif, openslide }:
|
2021-04-14 06:51:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "timg";
|
2022-01-08 20:10:41 +00:00
|
|
|
version = "1.4.3";
|
2021-04-14 06:51:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hzeller";
|
|
|
|
repo = "timg";
|
|
|
|
rev = "v${version}";
|
2022-01-08 20:10:41 +00:00
|
|
|
sha256 = "1lanr2y9rchl0xmycsyl0bhnh9mrmr5dj46pglw4lykz4rxslzcx";
|
2021-04-14 06:51:55 +00:00
|
|
|
};
|
|
|
|
|
2022-01-08 20:10:41 +00:00
|
|
|
buildInputs = [ graphicsmagick ffmpeg libexif libjpeg openslide zlib ];
|
2021-04-14 06:51:55 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DTIMG_VERSION_FROM_GIT=Off"
|
|
|
|
"-DWITH_VIDEO_DECODING=On"
|
|
|
|
"-DWITH_VIDEO_DEVICE=On"
|
2022-01-08 20:10:41 +00:00
|
|
|
"-DWITH_OPENSLIDE_SUPPORT=On"
|
2021-04-14 06:51:55 +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 ];
|
|
|
|
};
|
|
|
|
}
|