2016-04-13 13:36:35 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeQtWrapper
|
2015-12-20 02:13:45 +00:00
|
|
|
, libX11, libxcb, mesa
|
|
|
|
, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras
|
2014-09-18 02:59:50 +01:00
|
|
|
, ffmpeg
|
|
|
|
, libchardet
|
|
|
|
, mpg123
|
|
|
|
, libass
|
|
|
|
, libdvdread
|
|
|
|
, libdvdnav
|
|
|
|
, icu
|
|
|
|
, libquvi
|
|
|
|
, alsaLib
|
|
|
|
, libvdpau, libva
|
|
|
|
, libbluray
|
|
|
|
, jackSupport ? false, jack ? null
|
|
|
|
, portaudioSupport ? false, portaudio ? null
|
2015-05-27 20:42:15 +01:00
|
|
|
, pulseSupport ? true, libpulseaudio ? null
|
2014-09-18 02:59:50 +01:00
|
|
|
, cddaSupport ? false, libcdda ? null
|
2015-05-18 14:59:02 +01:00
|
|
|
, youtubeSupport ? true, youtube-dl ? null
|
2014-09-18 02:59:50 +01:00
|
|
|
}:
|
|
|
|
|
2015-05-18 14:59:02 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2014-09-18 02:59:50 +01:00
|
|
|
assert jackSupport -> jack != null;
|
|
|
|
assert portaudioSupport -> portaudio != null;
|
2015-05-27 20:42:15 +01:00
|
|
|
assert pulseSupport -> libpulseaudio != null;
|
2014-09-18 02:59:50 +01:00
|
|
|
assert cddaSupport -> libcdda != null;
|
2015-05-18 14:59:02 +01:00
|
|
|
assert youtubeSupport -> youtube-dl != null;
|
2014-09-18 02:59:50 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-02-02 17:24:27 +00:00
|
|
|
name = "bomi-${version}";
|
2015-07-28 09:16:48 +01:00
|
|
|
version = "0.9.11";
|
2014-09-18 02:59:50 +01:00
|
|
|
|
2015-02-02 17:24:27 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xylosper";
|
|
|
|
repo = "bomi";
|
|
|
|
rev = "v${version}";
|
2015-07-28 09:16:48 +01:00
|
|
|
sha256 = "0a7n46gn3n5098lxxvl3s29s8jlkzss6by9074jx94ncn9cayf2h";
|
2014-09-18 02:59:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = with stdenv.lib;
|
2015-03-24 15:31:27 +00:00
|
|
|
[ libX11 libxcb mesa
|
2015-12-20 02:13:45 +00:00
|
|
|
qtbase qtx11extras
|
2014-09-18 02:59:50 +01:00
|
|
|
ffmpeg
|
|
|
|
libchardet
|
|
|
|
mpg123
|
|
|
|
libass
|
|
|
|
libdvdread
|
|
|
|
libdvdnav
|
|
|
|
icu
|
|
|
|
libquvi
|
|
|
|
alsaLib
|
|
|
|
libvdpau
|
|
|
|
libva
|
|
|
|
libbluray
|
2016-04-13 13:36:35 +01:00
|
|
|
qtdeclarative
|
2016-01-01 13:57:28 +00:00
|
|
|
qtquickcontrols
|
2014-09-18 02:59:50 +01:00
|
|
|
]
|
|
|
|
++ optional jackSupport jack
|
|
|
|
++ optional portaudioSupport portaudio
|
2015-05-27 20:42:15 +01:00
|
|
|
++ optional pulseSupport libpulseaudio
|
2014-09-18 02:59:50 +01:00
|
|
|
++ optional cddaSupport libcdda
|
|
|
|
;
|
|
|
|
|
2014-10-02 09:22:47 +01:00
|
|
|
preConfigure = ''
|
2015-02-02 17:24:27 +00:00
|
|
|
patchShebangs configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
2015-05-18 14:59:02 +01:00
|
|
|
patchShebangs src/mpv/waf
|
|
|
|
patchShebangs build-mpv
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2016-04-13 13:36:35 +01:00
|
|
|
wrapQtProgram $out/bin/bomi \
|
2015-05-18 14:59:02 +01:00
|
|
|
${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"}
|
2014-10-02 09:22:47 +01:00
|
|
|
'';
|
2014-09-18 02:59:50 +01:00
|
|
|
|
|
|
|
configureFlags = with stdenv.lib;
|
|
|
|
[ "--qmake=qmake" ]
|
|
|
|
++ optional jackSupport "--enable-jack"
|
|
|
|
++ optional portaudioSupport "--enable-portaudio"
|
|
|
|
++ optional pulseSupport "--enable-pulseaudio"
|
|
|
|
++ optional cddaSupport "--enable-cdda"
|
|
|
|
;
|
|
|
|
|
2016-04-13 13:36:35 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig perl python which qttools makeQtWrapper ];
|
2014-09-18 02:59:50 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Powerful and easy-to-use multimedia player";
|
2015-02-02 17:24:27 +00:00
|
|
|
homepage = https://bomi-player.github.io/;
|
2014-09-18 02:59:50 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.abbradar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|