depot/third_party/nixpkgs/pkgs/applications/graphics/qimgv/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

57 lines
1 KiB
Nix

{ mkDerivation
, lib
, fetchFromGitHub
, cmake
, pkgconfig
, exiv2
, mpv
, qtbase
, qtimageformats
, qtsvg
}:
mkDerivation rec {
pname = "qimgv";
version = "0.8.9";
src = fetchFromGitHub {
owner = "easymodo";
repo = pname;
rev = "v${version}";
sha256 = "0cmya06j466v0pirhxbzbj1vbz0346y7rbc1gbv4n9xcp6c6bln6";
};
nativeBuildInputs = [
cmake
pkgconfig
];
buildInputs = [
exiv2
mpv
qtbase
qtimageformats
qtsvg
];
postPatch = ''
sed -i "s@/usr/bin/mpv@${mpv}/bin/mpv@" \
qimgv/settings.cpp
'';
# Wrap the library path so it can see `libqimgv_player_mpv.so`, which is used
# to play video files within qimgv itself.
qtWrapperArgs = [
"--prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib"
];
meta = with lib; {
description = "A Qt5 image viewer with optional video support";
homepage = "https://github.com/easymodo/qimgv";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ cole-h ];
};
}