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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

141 lines
3.2 KiB
Nix
Raw Normal View History

{ lib, config, clangStdenv, fetchFromGitHub
, autoconf
, automake
, libtool
, intltool
, pkg-config
, jansson
, swift-corelibs-libdispatch
# deadbeef can use either gtk2 or gtk3
2022-05-09 21:41:36 +00:00
, gtk2Support ? false, gtk2
, gtk3Support ? true, gtk3, gsettings-desktop-schemas, wrapGAppsHook3
2014-09-13 20:06:28 +00:00
# input plugins
2022-05-09 21:41:36 +00:00
, vorbisSupport ? true, libvorbis
, mp123Support ? true, libmad
, flacSupport ? true, flac
, wavSupport ? true, libsndfile
, cdaSupport ? true, libcdio, libcddb
, aacSupport ? true, faad2
, opusSupport ? true, opusfile
, wavpackSupport ? false, wavpack
, ffmpegSupport ? false, ffmpeg
, apeSupport ? true, yasm
2014-09-13 20:06:28 +00:00
# misc plugins
2022-05-09 21:41:36 +00:00
, zipSupport ? true, libzip
, artworkSupport ? true, imlib2
, hotkeysSupport ? true, libX11
, osdSupport ? true, dbus
2014-09-13 20:06:28 +00:00
# output plugins
2022-05-09 21:41:36 +00:00
, alsaSupport ? true, alsa-lib
, pulseSupport ? config.pulseaudio or true, libpulseaudio
2023-04-16 01:52:28 +00:00
, pipewireSupport ? true, pipewire
2014-09-13 20:06:28 +00:00
# effect plugins
2022-05-09 21:41:36 +00:00
, resamplerSupport ? true, libsamplerate
, overloadSupport ? true, zlib
2014-09-13 20:06:28 +00:00
# transports
2022-05-09 21:41:36 +00:00
, remoteSupport ? true, curl
2014-09-13 20:06:28 +00:00
}:
assert gtk2Support || gtk3Support;
2014-09-13 20:06:28 +00:00
let
inherit (lib) optionals;
2023-11-08 06:21:12 +00:00
version = "1.9.6";
in clangStdenv.mkDerivation {
pname = "deadbeef";
inherit version;
2014-09-13 20:06:28 +00:00
src = fetchFromGitHub {
owner = "DeaDBeeF-Player";
repo = "deadbeef";
fetchSubmodules = true;
rev = version;
2023-11-08 06:21:12 +00:00
hash = "sha256-Q6hL4fOFPHn26ZqvrebgTMTgQZrhbXCEhM4ZFzNeyJE=";
2014-09-13 20:06:28 +00:00
};
buildInputs = [
jansson
swift-corelibs-libdispatch
] ++ optionals gtk2Support [
gtk2
] ++ optionals gtk3Support [
gtk3
gsettings-desktop-schemas
] ++ optionals vorbisSupport [
libvorbis
] ++ optionals mp123Support [
libmad
] ++ optionals flacSupport [
flac
] ++ optionals wavSupport [
libsndfile
] ++ optionals cdaSupport [
libcdio
libcddb
] ++ optionals aacSupport [
faad2
] ++ optionals opusSupport [
opusfile
] ++ optionals zipSupport [
libzip
] ++ optionals ffmpegSupport [
ffmpeg
] ++ optionals apeSupport [
yasm
] ++ optionals artworkSupport [
imlib2
] ++ optionals hotkeysSupport [
libX11
] ++ optionals osdSupport [
dbus
] ++ optionals alsaSupport [
alsa-lib
] ++ optionals pulseSupport [
libpulseaudio
2023-04-16 01:52:28 +00:00
] ++ optionals pipewireSupport [
pipewire
] ++ optionals resamplerSupport [
libsamplerate
] ++ optionals overloadSupport [
zlib
] ++ optionals wavpackSupport [
wavpack
] ++ optionals remoteSupport [
curl
];
2014-09-13 20:06:28 +00:00
nativeBuildInputs = [
autoconf
automake
intltool
libtool
pkg-config
] ++ optionals gtk3Support [
wrapGAppsHook3
];
2014-09-13 20:06:28 +00:00
enableParallelBuilding = true;
preConfigure = ''
./autogen.sh
'';
postPatch = ''
# Fix the build on c++17 compiler:
# https://github.com/DeaDBeeF-Player/deadbeef/issues/3012
# TODO: remove after 1.9.5 release.
substituteInPlace plugins/adplug/Makefile.am --replace 'adplug_la_CXXFLAGS = ' 'adplug_la_CXXFLAGS = -std=c++11 '
'';
meta = with lib; {
2014-09-13 20:06:28 +00:00
description = "Ultimate Music Player for GNU/Linux";
mainProgram = "deadbeef";
2020-03-29 15:08:22 +00:00
homepage = "http://deadbeef.sourceforge.net/";
2023-04-16 01:52:28 +00:00
downloadPage = "https://github.com/DeaDBeeF-Player/deadbeef";
2014-09-13 20:06:28 +00:00
license = licenses.gpl2;
2018-03-09 13:22:08 +00:00
platforms = [ "x86_64-linux" "i686-linux" ];
2014-09-13 20:06:28 +00:00
maintainers = [ maintainers.abbradar ];
};
}