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
|
2024-02-07 01:22:34 +00:00
|
|
|
, poppler
|
|
|
|
, librsvg
|
|
|
|
, cairo
|
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";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.6.0";
|
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}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-rTqToWgCPQeRYnMUmhPd/lJPX6L9PstFs1NczyecaB0=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
graphicsmagick
|
|
|
|
libdeflate
|
|
|
|
libexif
|
|
|
|
libjpeg
|
|
|
|
libsixel
|
|
|
|
openslide
|
2024-02-07 01:22:34 +00:00
|
|
|
poppler
|
|
|
|
librsvg
|
|
|
|
cairo
|
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 = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "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
|
|
|
})
|