3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/graphics/qimgv/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1 KiB
Nix
Raw Normal View History

{ mkDerivation
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, exiv2
, mpv
, opencv4
, qtbase
, qtimageformats
, qtsvg
}:
mkDerivation rec {
pname = "qimgv";
2021-10-29 08:33:43 +01:00
version = "1.0.2";
src = fetchFromGitHub {
owner = "easymodo";
repo = pname;
rev = "v${version}";
2021-10-29 08:33:43 +01:00
sha256 = "sha256-YlV/ysm7bdPverpKpanrL+jPVvMtP1paoAm0PREMaww=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
exiv2
mpv
opencv4
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 ];
};
}