2023-08-22 20:05:09 +00:00
|
|
|
{ cmake
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, ffmpeg
|
|
|
|
, graphicsmagick
|
2023-08-22 20:05:09 +00:00
|
|
|
, lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, libdeflate
|
|
|
|
, libexif
|
|
|
|
, libjpeg
|
|
|
|
, libsixel
|
|
|
|
, openslide
|
2023-08-22 20:05:09 +00:00
|
|
|
, pkg-config
|
|
|
|
, stb
|
|
|
|
, qoi
|
|
|
|
, stdenv
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-04-17 00:35:05 +00:00
|
|
|
pname = "timg";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "1.5.2";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hzeller";
|
|
|
|
repo = "timg";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-e2Uy1jvS0+gdhto4Sgz6YlqEqXJ7KGUAA6iuixfvvJg=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
graphicsmagick
|
|
|
|
libdeflate
|
|
|
|
libexif
|
|
|
|
libjpeg
|
|
|
|
libsixel
|
|
|
|
openslide
|
2023-08-22 20:05:09 +00:00
|
|
|
qoi.dev
|
|
|
|
stb
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
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"
|
2023-07-15 17:15:38 +00:00
|
|
|
"-DWITH_LIBSIXEL=On"
|
2021-04-17 00:35:05 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
meta = {
|
2021-04-17 00:35:05 +00:00
|
|
|
description = "A terminal image and video viewer";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://timg.sh/";
|
|
|
|
license = lib.licenses.gpl2Only;
|
|
|
|
mainProgram = "timg";
|
|
|
|
maintainers = with lib.maintainers; [ hzeller ];
|
|
|
|
platforms = lib.platforms.unix;
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
})
|