forked from mirrors/nixpkgs
Merge pull request #84965 from cole-h/qimgv
qimgv: enable video support
This commit is contained in:
commit
3988732856
|
@ -1,6 +1,15 @@
|
|||
{ mkDerivation, fetchFromGitHub, lib
|
||||
, pkgconfig, cmake
|
||||
, exiv2, qtbase, qtimageformats, qtsvg
|
||||
{ mkDerivation
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, cmake
|
||||
, pkgconfig
|
||||
|
||||
, exiv2
|
||||
, mpv
|
||||
, qtbase
|
||||
, qtimageformats
|
||||
, qtsvg
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
|
@ -14,33 +23,32 @@ mkDerivation rec {
|
|||
sha256 = "0cmya06j466v0pirhxbzbj1vbz0346y7rbc1gbv4n9xcp6c6bln6";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
# Video support appears to be broken; the following gets printed upon
|
||||
# attempting to view an mp4, webm, or mkv (and probably all video formats):
|
||||
#
|
||||
# [VideoPlayerInitProxy] Error - could not load player library
|
||||
# "qimgv_player_mpv"
|
||||
#
|
||||
# GIFs are unaffected. If this ever gets addressed, all that is necessary is
|
||||
# to add `mpv` to the arguments list and to `buildInputs`, and to remove
|
||||
# `cmakeFlags`.
|
||||
"-DVIDEO_SUPPORT=OFF"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
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 = "Qt5 image viewer with optional video support";
|
||||
description = "A Qt5 image viewer with optional video support";
|
||||
homepage = "https://github.com/easymodo/qimgv";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
|
|
Loading…
Reference in a new issue