2022-11-04 12:27:35 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, 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-03-05 16:20:37 +00:00
|
|
|
version = "1.4.4";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hzeller";
|
|
|
|
repo = "timg";
|
|
|
|
rev = "v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "1gdwg15fywya6k6pajkx86kv2d8k85pmisnq53b02br5i01y4k41";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/hzeller/timg/commit/e9667ea2c811aa9eb399b631aef9bba0d3711834.patch";
|
|
|
|
sha256 = "sha256-xvbOcnKqX52wYZlzm4Be9dz8Rq+n3s2kKPFr0Y0igAU=";
|
|
|
|
name = "CVE-2022-43151.patch";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|