depot/third_party/nixpkgs/pkgs/tools/graphics/timg/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

53 lines
944 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, ffmpeg
, graphicsmagick
, libdeflate
, libexif
, libjpeg
, libsixel
, openslide
}:
stdenv.mkDerivation rec {
pname = "timg";
version = "1.5.1";
src = fetchFromGitHub {
owner = "hzeller";
repo = "timg";
rev = "v${version}";
hash = "sha256-hGQL6MAsaSVV/w5fDKAcd4KIBuh2pvl3D2QUzi/aeG0=";
};
buildInputs = [
ffmpeg
graphicsmagick
libdeflate
libexif
libjpeg
libsixel
openslide
];
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [
"-DTIMG_VERSION_FROM_GIT=Off"
"-DWITH_VIDEO_DECODING=On"
"-DWITH_VIDEO_DEVICE=On"
"-DWITH_OPENSLIDE_SUPPORT=On"
"-DWITH_LIBSIXEL=On"
];
meta = with lib; {
homepage = "https://timg.sh/";
description = "A terminal image and video viewer";
license = licenses.gpl2Only;
platforms = platforms.unix;
maintainers = with maintainers; [ hzeller ];
};
}