mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-01 18:44:07 +00:00
a276d1220d
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.
58 lines
1.0 KiB
Nix
58 lines
1.0 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 ];
|
|
};
|
|
}
|