3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/video/bomi/default.nix

105 lines
2.7 KiB
Nix
Raw Normal View History

2015-05-18 14:59:02 +01:00
{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeWrapper
2014-09-18 02:59:50 +01:00
, libX11, libxcb, qt5, mesa
, ffmpeg
, libchardet
, mpg123
, libass
, libdvdread
, libdvdnav
, icu
, libquvi
, alsaLib
, libvdpau, libva
, libbluray
, jackSupport ? false, jack ? null
, portaudioSupport ? false, portaudio ? null
, pulseSupport ? true, pulseaudio ? null
, 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;
assert pulseSupport -> pulseaudio != null;
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
2015-02-02 17:24:27 +00:00
let
waf = fetchurl {
url = http://ftp.waf.io/pub/release/waf-1.8.4;
sha256 = "1a7skwgpl91adhcwlmdr76xzdpidh91hvcmj34zz6548bpx3a87h";
};
in
2014-09-18 02:59:50 +01:00
stdenv.mkDerivation rec {
2015-02-02 17:24:27 +00:00
name = "bomi-${version}";
2015-05-18 14:59:02 +01:00
version = "0.9.10";
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-05-18 14:59:02 +01:00
sha256 = "1c7497gks7yxzfy6jx77vn9zs2pdq7y6l9w61miwnkdm91093n17";
2014-09-18 02:59:50 +01:00
};
buildInputs = with stdenv.lib;
2015-03-24 15:31:27 +00:00
[ libX11 libxcb mesa
2015-05-18 14:59:02 +01:00
qt5.base qt5.x11extras qt5.declarative qt5.quickcontrols
2014-09-18 02:59:50 +01:00
ffmpeg
libchardet
mpg123
libass
libdvdread
libdvdnav
icu
libquvi
alsaLib
libvdpau
libva
libbluray
]
++ optional jackSupport jack
++ optional portaudioSupport portaudio
++ optional pulseSupport pulseaudio
++ optional cddaSupport libcdda
;
2014-10-02 09:22:47 +01:00
preConfigure = ''
2015-02-02 17:24:27 +00:00
patchShebangs configure
'';
preBuild = ''
install -m755 ${waf} src/mpv/waf
2015-05-18 14:59:02 +01:00
patchShebangs src/mpv/waf
patchShebangs build-mpv
'';
postInstall = ''
wrapProgram $out/bin/bomi \
${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"
;
2015-05-18 14:59:02 +01:00
nativeBuildInputs = [ pkgconfig perl python which qt5.tools makeWrapper ];
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;
};
}