nixpkgs-suyu/pkgs/applications/audio/deadbeef/default.nix

125 lines
3.8 KiB
Nix
Raw Normal View History

{ config, stdenv, fetchFromGitHub
, autoconf
, automake
, libtool
, intltool
, pkgconfig
, jansson
# deadbeef can use either gtk2 or gtk3
2016-03-03 12:10:48 +01:00
, gtk2Support ? false, gtk2 ? null
, gtk3Support ? true, gtk3 ? null, gsettings-desktop-schemas ? null, wrapGAppsHook ? null
2014-09-13 22:06:28 +02:00
# input plugins
, vorbisSupport ? true, libvorbis ? null
, mp123Support ? true, libmad ? null
, flacSupport ? true, flac ? null
, wavSupport ? true, libsndfile ? null
, cdaSupport ? true, libcdio ? null, libcddb ? null
, aacSupport ? true, faad2 ? null
, opusSupport ? true, opusfile ? null
2014-09-13 22:06:28 +02:00
, wavpackSupport ? false, wavpack ? null
, ffmpegSupport ? false, ffmpeg ? null
2016-01-31 10:12:16 +01:00
, apeSupport ? true, yasm ? null
2014-09-13 22:06:28 +02:00
# misc plugins
, zipSupport ? true, libzip ? null
, artworkSupport ? true, imlib2 ? null
, hotkeysSupport ? true, libX11 ? null
, osdSupport ? true, dbus ? null
# output plugins
, alsaSupport ? true, alsaLib ? null
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
2014-09-13 22:06:28 +02:00
# effect plugins
, resamplerSupport ? true, libsamplerate ? null
, overloadSupport ? true, zlib ? null
# transports
, remoteSupport ? true, curl ? null
}:
assert gtk2Support || gtk3Support;
assert gtk2Support -> gtk2 != null;
assert gtk3Support -> gtk3 != null && gsettings-desktop-schemas != null && wrapGAppsHook != null;
2014-09-13 22:06:28 +02:00
assert vorbisSupport -> libvorbis != null;
assert mp123Support -> libmad != null;
assert flacSupport -> flac != null;
assert wavSupport -> libsndfile != null;
assert cdaSupport -> (libcdio != null && libcddb != null);
assert aacSupport -> faad2 != null;
assert opusSupport -> opusfile != null;
2014-09-13 22:06:28 +02:00
assert zipSupport -> libzip != null;
assert ffmpegSupport -> ffmpeg != null;
2016-01-31 10:12:16 +01:00
assert apeSupport -> yasm != null;
2014-09-13 22:06:28 +02:00
assert artworkSupport -> imlib2 != null;
assert hotkeysSupport -> libX11 != null;
assert osdSupport -> dbus != null;
assert alsaSupport -> alsaLib != null;
assert pulseSupport -> libpulseaudio != null;
2014-09-13 22:06:28 +02:00
assert resamplerSupport -> libsamplerate != null;
assert overloadSupport -> zlib != null;
assert wavpackSupport -> wavpack != null;
assert remoteSupport -> curl != null;
stdenv.mkDerivation rec {
pname = "deadbeef";
version = "1.8.0";
2014-09-13 22:06:28 +02:00
src = fetchFromGitHub {
owner = "DeaDBeeF-Player";
repo = "deadbeef";
rev = version;
sha256 = "126i5qlkpv7pvi1mmc9y0jhqs6jjspsj7j615n2ddvsb2jsps81c";
2014-09-13 22:06:28 +02:00
};
patches = [
# Fix broken symbol name
# https://github.com/NixOS/nixpkgs/pull/59187#issuecomment-480977993
# will be fixed in deadbeef 1.8.1
./fix-wildmidi.patch
];
2016-03-03 12:10:48 +01:00
buildInputs = with stdenv.lib; [ jansson ]
++ optional gtk2Support gtk2
++ optionals gtk3Support [ gtk3 gsettings-desktop-schemas ]
2014-09-13 22:06:28 +02:00
++ optional vorbisSupport libvorbis
++ optional mp123Support libmad
++ optional flacSupport flac
++ optional wavSupport libsndfile
2016-03-03 12:10:48 +01:00
++ optionals cdaSupport [ libcdio libcddb ]
2014-09-13 22:06:28 +02:00
++ optional aacSupport faad2
++ optional opusSupport opusfile
2014-09-13 22:06:28 +02:00
++ optional zipSupport libzip
++ optional ffmpegSupport ffmpeg
2016-01-31 10:12:16 +01:00
++ optional apeSupport yasm
2014-09-13 22:06:28 +02:00
++ optional artworkSupport imlib2
++ optional hotkeysSupport libX11
++ optional osdSupport dbus
++ optional alsaSupport alsaLib
++ optional pulseSupport libpulseaudio
2014-09-13 22:06:28 +02:00
++ optional resamplerSupport libsamplerate
++ optional overloadSupport zlib
++ optional wavpackSupport wavpack
++ optional remoteSupport curl
;
nativeBuildInputs = [
autoconf
automake
intltool
libtool
pkgconfig
] ++ stdenv.lib.optional gtk3Support wrapGAppsHook;
2014-09-13 22:06:28 +02:00
enableParallelBuilding = true;
preConfigure = ''
./autogen.sh
'';
2014-09-13 22:06:28 +02:00
meta = with stdenv.lib; {
description = "Ultimate Music Player for GNU/Linux";
homepage = http://deadbeef.sourceforge.net/;
2014-09-13 22:06:28 +02:00
license = licenses.gpl2;
2018-03-09 14:22:08 +01:00
platforms = [ "x86_64-linux" "i686-linux" ];
2014-09-13 22:06:28 +02:00
maintainers = [ maintainers.abbradar ];
repositories.git = "https://github.com/Alexey-Yakovenko/deadbeef";
2014-09-13 22:06:28 +02:00
};
}