Created
May 5, 2023 17:23
-
-
Save pedrovhb/d9674fe42c7c9b0888cf386bed147599 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, stdenv, lib, fetchFromGitHub, fetchpatch | |
, cmake, pkgconfig | |
, exiv2, mpv, opencv4 | |
# , qtbase | |
# , qtimageformats | |
# , qtsvg | |
}: | |
# { pkgs ? import <nixpkgs> { } }: | |
with pkgs; | |
let kimageformats = callPackage ./kimageformats.nix { }; | |
in stdenv.mkDerivation rec { | |
pname = "qimgv"; | |
version = "1.0.3-alpha"; | |
src = fetchFromGitHub { | |
owner = "easymodo"; | |
repo = pname; | |
rev = "v${version}"; | |
sha256 = "sha256-fHMSo8zlOl9Lt8nYwClUzON4TPB9Ogwven+TidsesxY="; | |
}; | |
# patches = [ | |
# # QtAtomicInt's `storeRelaxed` was introduced in Qt 5.14, while nixpkgs only | |
# # has Qt 5.12. This appears to be the only instance of Qt 5.12 | |
# # incompatibility, and will be fixed in the next release. | |
# (fetchpatch { | |
# url = "https://github.com/easymodo/qimgv/commit/a39d6086ceb9445d2c16943e0719096a99920bf8.patch"; | |
# sha256 = "1z3ngv6i316hrdcdzig4jg6bcdbgfxjaxvm2jcfcw2dnfbfiq47s"; | |
# }) | |
# ]; | |
nativeBuildInputs = [ | |
cmake | |
pkgconfig | |
libsForQt5.qt5.qtbase | |
libsForQt5.qt5.wrapQtAppsHook | |
kimageformats | |
]; | |
buildInputs = [ | |
exiv2 | |
mpv | |
opencv4 | |
libsForQt5.qt5.qtbase | |
# libsForQt5.qt5.qtimageformats | |
kimageformats | |
libsForQt5.qt5.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 ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment