qimgv: enable video support
I actually went back and `strace`'d the binary when it complained about being unable to load the library it uses for playing videos. Turns out, it wasn't finding the library because it wasn't in any of its library paths. I added the lib path to `LD_LIBRARY_PATH` so it can find the library it uses to play videos, and now things are peachy. There is a (seemingly innocuous) error that gets displayed from Exiv2 being unable to determine its image type. Since it's actually a video, I think it's fine. Another issue that pops up in the output is missing `libcuda.so.1`, but that doesn't seem to affect functionality, and using `addOpenGLRunpath` on both the binary and libraries didn't silence it. Also did a little formatting.
This commit is contained in:
parent
dc75767b7f
commit
a276d1220d
@ -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 New Issue
Block a user