bomi: update, add youtube-dl support

This commit is contained in:
Nikolay Amiantov 2015-05-18 16:59:02 +03:00
parent e919cf0be2
commit 19b4eb8208

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python3, which { stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeWrapper
, libX11, libxcb, qt5, mesa , libX11, libxcb, qt5, mesa
, ffmpeg , ffmpeg
, libchardet , libchardet
@ -15,12 +15,16 @@
, portaudioSupport ? false, portaudio ? null , portaudioSupport ? false, portaudio ? null
, pulseSupport ? true, pulseaudio ? null , pulseSupport ? true, pulseaudio ? null
, cddaSupport ? false, libcdda ? null , cddaSupport ? false, libcdda ? null
, youtubeSupport ? true, youtube-dl ? null
}: }:
with stdenv.lib;
assert jackSupport -> jack != null; assert jackSupport -> jack != null;
assert portaudioSupport -> portaudio != null; assert portaudioSupport -> portaudio != null;
assert pulseSupport -> pulseaudio != null; assert pulseSupport -> pulseaudio != null;
assert cddaSupport -> libcdda != null; assert cddaSupport -> libcdda != null;
assert youtubeSupport -> youtube-dl != null;
let let
waf = fetchurl { waf = fetchurl {
@ -32,18 +36,18 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "bomi-${version}"; name = "bomi-${version}";
version = "0.9.5"; version = "0.9.10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xylosper"; owner = "xylosper";
repo = "bomi"; repo = "bomi";
rev = "v${version}"; rev = "v${version}";
sha256 = "1pf82dp7v18yd7knsjl853sfzhq4rqc3sq15jgqiw37096gp0sll"; sha256 = "1c7497gks7yxzfy6jx77vn9zs2pdq7y6l9w61miwnkdm91093n17";
}; };
buildInputs = with stdenv.lib; buildInputs = with stdenv.lib;
[ libX11 libxcb mesa [ libX11 libxcb mesa
qt5.base qt5.quick1 qt5.x11extras qt5.base qt5.x11extras qt5.declarative qt5.quickcontrols
ffmpeg ffmpeg
libchardet libchardet
mpg123 mpg123
@ -65,13 +69,17 @@ stdenv.mkDerivation rec {
preConfigure = '' preConfigure = ''
patchShebangs configure patchShebangs configure
# src/mpv/waf build-mpv; do
''; '';
preBuild = '' preBuild = ''
patchShebangs build-mpv
install -m755 ${waf} src/mpv/waf install -m755 ${waf} src/mpv/waf
sed -i '1 s,.*,#!${python3.interpreter},' src/mpv/waf patchShebangs src/mpv/waf
patchShebangs build-mpv
'';
postInstall = ''
wrapProgram $out/bin/bomi \
${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"}
''; '';
configureFlags = with stdenv.lib; configureFlags = with stdenv.lib;
@ -82,7 +90,7 @@ stdenv.mkDerivation rec {
++ optional cddaSupport "--enable-cdda" ++ optional cddaSupport "--enable-cdda"
; ;
nativeBuildInputs = [ pkgconfig perl which ]; nativeBuildInputs = [ pkgconfig perl python which qt5.tools makeWrapper ];
enableParallelBuilding = true; enableParallelBuilding = true;