2023-08-17 12:06:03 +00:00
|
|
|
{ cmake
|
2023-07-09 05:32:01 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, ffmpeg
|
|
|
|
, graphicsmagick
|
2023-08-17 12:06:03 +00:00
|
|
|
, lib
|
2023-07-09 05:32:01 +00:00
|
|
|
, libdeflate
|
|
|
|
, libexif
|
|
|
|
, libjpeg
|
|
|
|
, libsixel
|
|
|
|
, openslide
|
2024-01-26 01:53:11 +00:00
|
|
|
, poppler
|
|
|
|
, librsvg
|
|
|
|
, cairo
|
2023-08-17 12:06:03 +00:00
|
|
|
, pkg-config
|
|
|
|
, stb
|
|
|
|
, qoi
|
|
|
|
, stdenv
|
2023-07-09 05:32:01 +00:00
|
|
|
}:
|
2021-04-14 06:51:55 +00:00
|
|
|
|
2023-08-17 12:06:03 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-04-14 06:51:55 +00:00
|
|
|
pname = "timg";
|
2024-01-26 01:53:11 +00:00
|
|
|
version = "1.6.0";
|
2021-04-14 06:51:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hzeller";
|
|
|
|
repo = "timg";
|
2023-08-17 12:06:03 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-01-26 01:53:11 +00:00
|
|
|
hash = "sha256-rTqToWgCPQeRYnMUmhPd/lJPX6L9PstFs1NczyecaB0=";
|
2021-04-14 06:51:55 +00:00
|
|
|
};
|
|
|
|
|
2023-07-09 05:32:01 +00:00
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
graphicsmagick
|
|
|
|
libdeflate
|
|
|
|
libexif
|
|
|
|
libjpeg
|
|
|
|
libsixel
|
|
|
|
openslide
|
2024-01-26 01:53:11 +00:00
|
|
|
poppler
|
|
|
|
librsvg
|
|
|
|
cairo
|
2023-08-17 12:06:03 +00:00
|
|
|
qoi.dev
|
|
|
|
stb
|
2023-07-09 05:32:01 +00:00
|
|
|
];
|
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"
|
2023-07-09 05:32:01 +00:00
|
|
|
"-DWITH_LIBSIXEL=On"
|
2021-04-14 06:51:55 +00:00
|
|
|
];
|
|
|
|
|
2023-08-17 12:06:03 +00:00
|
|
|
meta = {
|
2024-06-07 07:46:46 +00:00
|
|
|
description = "Terminal image and video viewer";
|
2023-08-17 12:06:03 +00:00
|
|
|
homepage = "https://timg.sh/";
|
|
|
|
license = lib.licenses.gpl2Only;
|
|
|
|
mainProgram = "timg";
|
|
|
|
maintainers = with lib.maintainers; [ hzeller ];
|
|
|
|
platforms = lib.platforms.unix;
|
2021-04-14 06:51:55 +00:00
|
|
|
};
|
2023-08-17 12:06:03 +00:00
|
|
|
})
|