2017-05-17 21:26:11 +02:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, extra-cmake-modules
|
2017-04-17 22:28:20 +02:00
|
|
|
, qtbase, qtmultimedia, qtquick1, qttools
|
2018-10-08 20:23:02 +02:00
|
|
|
, libGL, libX11
|
2017-04-17 22:28:20 +02:00
|
|
|
, libass, openal, ffmpeg, libuchardet
|
|
|
|
, alsaLib, libpulseaudio, libva
|
|
|
|
}:
|
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
with lib;
|
2017-04-17 22:28:20 +02:00
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
mkDerivation rec {
|
2017-04-17 22:28:20 +02:00
|
|
|
name = "libqtav-${version}";
|
2017-10-19 03:49:33 +02:00
|
|
|
version = "1.12.0";
|
2017-04-17 22:28:20 +02:00
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules qttools ];
|
2017-10-19 03:49:33 +02:00
|
|
|
buildInputs = [
|
2017-04-17 22:28:20 +02:00
|
|
|
qtbase qtmultimedia qtquick1
|
2018-10-08 20:23:02 +02:00
|
|
|
libGL libX11
|
2017-04-17 22:28:20 +02:00
|
|
|
libass openal ffmpeg libuchardet
|
|
|
|
alsaLib libpulseaudio libva
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-10-19 03:49:33 +02:00
|
|
|
sha256 = "03ii9l38l3fsr27g42fx4151ipzkip2kr4akdr8x28sx5r9rr5m2";
|
|
|
|
rev = "v${version}";
|
2017-04-17 22:28:20 +02:00
|
|
|
repo = "QtAV";
|
|
|
|
owner = "wang-bin";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2018-10-08 20:23:02 +02:00
|
|
|
# Make sure libqtav finds its libGL dependency at both link and run time
|
|
|
|
# by adding libGL to rpath. Not sure why it wasn't done automatically like
|
|
|
|
# the other libraries as `libGL` is part of our `buildInputs`.
|
|
|
|
NIX_CFLAGS_LINK = [ "-Wl,-rpath,${libGL}/lib"];
|
2017-04-17 22:28:20 +02:00
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp -a "./bin/"* "$out/bin"
|
|
|
|
'';
|
|
|
|
|
2018-10-08 20:23:02 +02:00
|
|
|
stripDebugList = [ "lib" "libexec" "bin" "qml" ];
|
|
|
|
|
2017-04-17 22:28:20 +02:00
|
|
|
meta = {
|
2018-10-08 20:23:02 +02:00
|
|
|
description = "A multimedia playback framework based on Qt + FFmpeg";
|
2017-04-17 22:28:20 +02:00
|
|
|
#license = licenses.lgpl21; # For the libraries / headers only.
|
|
|
|
license = licenses.gpl3; # With the examples (under bin) and most likely some of the optional dependencies used.
|
|
|
|
homepage = http://www.qtav.org/;
|
|
|
|
maintainers = [ maintainers.jraygauthier ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|