nixpkgs/pkgs/applications/video/bomi/default.nix

119 lines
3.3 KiB
Nix
Raw Normal View History

{ mkDerivation, config, stdenv, fetchFromGitHub
2019-02-03 15:31:24 +00:00
, fetchpatch, pkgconfig, perl, python, which
2019-11-10 16:44:34 +00:00
, libX11, libxcb, libGLU, libGL
, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras, qmake
2014-09-18 01:59:50 +00:00
, libchardet
2016-07-02 12:16:30 +00:00
, ffmpeg
2014-09-18 01:59:50 +00:00
, mpg123
, libass
, libdvdread
, libdvdnav
, icu
, libquvi
, alsaLib
, libvdpau, libva
, libbluray
, jackSupport ? false, jack ? null
, portaudioSupport ? false, portaudio ? null
2019-02-03 15:31:24 +00:00
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
2014-09-18 01:59:50 +00:00
, cddaSupport ? false, libcdda ? null
2015-05-18 13:59:02 +00:00
, youtubeSupport ? true, youtube-dl ? null
2014-09-18 01:59:50 +00:00
}:
2015-05-18 13:59:02 +00:00
with stdenv.lib;
2014-09-18 01:59:50 +00:00
assert jackSupport -> jack != null;
assert portaudioSupport -> portaudio != null;
assert pulseSupport -> libpulseaudio != null;
2014-09-18 01:59:50 +00:00
assert cddaSupport -> libcdda != null;
2015-05-18 13:59:02 +00:00
assert youtubeSupport -> youtube-dl != null;
2014-09-18 01:59:50 +00:00
mkDerivation rec {
pname = "bomi";
2015-07-28 08:16:48 +00:00
version = "0.9.11";
2014-09-18 01:59:50 +00:00
2015-02-02 17:24:27 +00:00
src = fetchFromGitHub {
owner = "xylosper";
repo = "bomi";
rev = "v${version}";
2015-07-28 08:16:48 +00:00
sha256 = "0a7n46gn3n5098lxxvl3s29s8jlkzss6by9074jx94ncn9cayf2h";
2014-09-18 01:59:50 +00:00
};
2016-07-02 12:16:30 +00:00
patches = [
(fetchpatch rec {
name = "bomi-compilation-fix.patch";
url = "https://svnweb.mageia.org/packages/cauldron/bomi/current/SOURCES/${name}?revision=995725&view=co&pathrev=995725";
sha256 = "1dwryya5ljx35dbx6ag9d3rjjazni2mfn3vwirjdijdy6yz22jm6";
})
(fetchpatch rec {
name = "bomi-fix-expected-unqualified-id-before-numeric-constant-unix.patch";
url = "https://svnweb.mageia.org/packages/cauldron/bomi/current/SOURCES/${name}?revision=995725&view=co&pathrev=995725";
sha256 = "0n3xsrdrggimzw30gxlnrr088ndbdjqlqr46dzmfv8zan79lv5ri";
})
];
2014-09-18 01:59:50 +00:00
buildInputs = with stdenv.lib;
2016-07-02 12:16:30 +00:00
[ libX11
libxcb
2019-11-10 16:44:34 +00:00
libGLU libGL
2016-07-02 12:16:30 +00:00
qtbase
qtx11extras
qtdeclarative
qtquickcontrols
2014-09-18 01:59:50 +00:00
ffmpeg
libchardet
2016-07-02 12:16:30 +00:00
2014-09-18 01:59:50 +00:00
mpg123
libass
libdvdread
libdvdnav
icu
libquvi
alsaLib
libvdpau
libva
libbluray
]
++ optional jackSupport jack
++ optional portaudioSupport portaudio
++ optional pulseSupport libpulseaudio
2014-09-18 01:59:50 +00:00
++ optional cddaSupport libcdda
;
2014-10-02 08:22:47 +00:00
preConfigure = ''
2015-02-02 17:24:27 +00:00
patchShebangs configure
'';
preBuild = ''
2015-05-18 13:59:02 +00:00
patchShebangs src/mpv/waf
patchShebangs build-mpv
'';
dontWrapQtApps = true;
2015-05-18 13:59:02 +00:00
postInstall = ''
wrapQtApp $out/bin/bomi \
2015-05-18 13:59:02 +00:00
${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"}
2014-10-02 08:22:47 +00:00
'';
2014-09-18 01:59:50 +00:00
2016-04-16 23:42:48 +00:00
dontUseQmakeConfigure = true;
2014-09-18 01:59:50 +00:00
configureFlags = with stdenv.lib;
[ "--qmake=qmake" ]
++ optional jackSupport "--enable-jack"
++ optional portaudioSupport "--enable-portaudio"
++ optional pulseSupport "--enable-pulseaudio"
++ optional cddaSupport "--enable-cdda"
;
nativeBuildInputs = [ pkgconfig perl python which qttools qmake ];
2014-09-18 01:59:50 +00:00
meta = with stdenv.lib; {
description = "Powerful and easy-to-use multimedia player";
homepage = "https://bomi-player.github.io/";
2014-09-18 01:59:50 +00:00
license = licenses.gpl2Plus;
maintainers = [ maintainers.abbradar ];
platforms = platforms.linux;
};
}