2020-04-11 03:23:10 +01:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2020-05-01 01:54:40 +01:00
|
|
|
, fetchpatch
|
2020-04-11 03:23:10 +01:00
|
|
|
|
|
|
|
, cmake
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-04-11 03:23:10 +01:00
|
|
|
|
|
|
|
, exiv2
|
|
|
|
, mpv
|
2020-05-01 01:54:40 +01:00
|
|
|
, opencv4
|
2020-04-11 03:23:10 +01:00
|
|
|
, qtbase
|
|
|
|
, qtimageformats
|
|
|
|
, qtsvg
|
2020-02-29 01:38:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "qimgv";
|
2021-10-29 08:33:43 +01:00
|
|
|
version = "1.0.2";
|
2020-02-29 01:38:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "easymodo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-29 08:33:43 +01:00
|
|
|
sha256 = "sha256-YlV/ysm7bdPverpKpanrL+jPVvMtP1paoAm0PREMaww=";
|
2020-02-29 01:38:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2020-02-29 01:38:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
exiv2
|
2020-04-11 03:23:10 +01:00
|
|
|
mpv
|
2020-05-01 01:54:40 +01:00
|
|
|
opencv4
|
2020-02-29 01:38:18 +00:00
|
|
|
qtbase
|
|
|
|
qtimageformats
|
|
|
|
qtsvg
|
|
|
|
];
|
|
|
|
|
2020-04-11 03:23:10 +01:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2020-02-29 01:38:18 +00:00
|
|
|
meta = with lib; {
|
2020-04-11 03:23:10 +01:00
|
|
|
description = "A Qt5 image viewer with optional video support";
|
2020-02-29 01:38:18 +00:00
|
|
|
homepage = "https://github.com/easymodo/qimgv";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ cole-h ];
|
|
|
|
};
|
|
|
|
}
|