2016-12-18 21:55:57 +00:00
|
|
|
{
|
2017-12-31 15:51:47 +00:00
|
|
|
mkDerivation, lib, fetchurl, fetchpatch,
|
2017-05-17 20:26:11 +01:00
|
|
|
gettext, pkgconfig,
|
2016-12-18 21:55:57 +00:00
|
|
|
qtbase,
|
2019-05-22 12:03:39 +01:00
|
|
|
alsaLib, curl, faad2, ffmpeg, flac, fluidsynth, gdk-pixbuf, lame, libbs2b,
|
2018-02-24 16:12:04 +00:00
|
|
|
libcddb, libcdio, libcue, libjack2, libmad, libmms, libmodplug,
|
2016-12-18 21:55:57 +00:00
|
|
|
libmowgli, libnotify, libogg, libpulseaudio, libsamplerate, libsidplayfp,
|
|
|
|
libsndfile, libvorbis, libxml2, lirc, mpg123, neon, qtmultimedia, soxr,
|
|
|
|
wavpack
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2017-12-31 15:51:47 +00:00
|
|
|
version = "3.9";
|
2016-12-18 21:55:57 +00:00
|
|
|
sources = {
|
|
|
|
"audacious-${version}" = fetchurl {
|
|
|
|
url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
|
2017-12-31 15:51:47 +00:00
|
|
|
sha256 = "0pmhrhsjhqnrq3zh4rhfys5jas53ph5ijkq010dxg1n779kl901d";
|
2016-12-18 21:55:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
"audacious-plugins-${version}" = fetchurl {
|
|
|
|
url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
|
2017-12-31 15:51:47 +00:00
|
|
|
sha256 = "1f17r7ar0mngcf7z41s6xh073vjafw3i7iy9ijb0cd6bi48g5xwb";
|
2016-12-18 21:55:57 +00:00
|
|
|
};
|
|
|
|
};
|
2017-12-31 15:51:47 +00:00
|
|
|
|
|
|
|
qt510_plugins_patch = fetchpatch {
|
|
|
|
url = "https://github.com/audacious-media-player/audacious-plugins/commit/971f7ff7c3d8a0b9b420bf4fd19ab97755607637.patch";
|
|
|
|
sha256 = "15fy37syj9ygl2ibkkz3g3b9wd22vk9bjfmvqhhkpxphry2zwb17";
|
|
|
|
};
|
2016-12-18 21:55:57 +00:00
|
|
|
in
|
|
|
|
|
2017-05-17 20:26:11 +01:00
|
|
|
mkDerivation {
|
2016-12-18 21:55:57 +00:00
|
|
|
inherit version;
|
2017-02-11 17:19:17 +00:00
|
|
|
name = "audacious-qt5-${version}";
|
2016-12-18 21:55:57 +00:00
|
|
|
|
|
|
|
sourceFiles = lib.attrValues sources;
|
|
|
|
sourceRoots = lib.attrNames sources;
|
|
|
|
|
2017-05-17 20:26:11 +01:00
|
|
|
nativeBuildInputs = [ gettext pkgconfig ];
|
2016-12-18 21:55:57 +00:00
|
|
|
|
2017-12-31 15:51:47 +00:00
|
|
|
inherit qt510_plugins_patch;
|
|
|
|
|
2016-12-18 21:55:57 +00:00
|
|
|
buildInputs = [
|
|
|
|
# Core dependencies
|
|
|
|
qtbase
|
|
|
|
|
|
|
|
# Plugin dependencies
|
2019-05-22 12:03:39 +01:00
|
|
|
alsaLib curl faad2 ffmpeg flac fluidsynth gdk-pixbuf lame libbs2b libcddb
|
2018-02-24 16:12:04 +00:00
|
|
|
libcdio libcue libjack2 libmad libmms libmodplug libmowgli
|
2016-12-18 21:55:57 +00:00
|
|
|
libnotify libogg libpulseaudio libsamplerate libsidplayfp libsndfile
|
|
|
|
libvorbis libxml2 lirc mpg123 neon qtmultimedia soxr wavpack
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-qt" "--disable-gtk" ];
|
|
|
|
|
|
|
|
# Here we build both audacious and audacious-plugins in one
|
|
|
|
# derivations, since they really expect to be in the same prefix.
|
|
|
|
# This is slighly tricky.
|
|
|
|
builder = builtins.toFile "builder.sh" ''
|
|
|
|
sourceFiles=( $sourceFiles )
|
|
|
|
sourceRoots=( $sourceRoots )
|
|
|
|
for (( i=0 ; i < ''${#sourceFiles[*]} ; i++ )); do
|
|
|
|
|
|
|
|
(
|
2017-12-31 15:51:47 +00:00
|
|
|
# only patch the plugins
|
|
|
|
if [ "$i" -eq "1" ]; then
|
|
|
|
patches=( $qt510_plugins_patch )
|
|
|
|
fi
|
2016-12-18 21:55:57 +00:00
|
|
|
src=''${sourceFiles[$i]}
|
|
|
|
sourceRoot=''${sourceRoots[$i]}
|
|
|
|
source $stdenv/setup
|
|
|
|
genericBuild
|
|
|
|
)
|
|
|
|
|
|
|
|
if [ $i == 0 ]; then
|
|
|
|
nativeBuildInputs="$out $nativeBuildInputs"
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2017-05-17 20:26:11 +01:00
|
|
|
meta = with lib; {
|
2016-12-18 21:55:57 +00:00
|
|
|
description = "Audio player";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://audacious-media-player.org/";
|
2016-12-18 21:55:57 +00:00
|
|
|
maintainers = with maintainers; [ ttuegel ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
license = with licenses; [
|
|
|
|
bsd2 bsd3 #https://github.com/audacious-media-player/audacious/blob/master/COPYING
|
|
|
|
gpl2 gpl3 lgpl2Plus #http://redmine.audacious-media-player.org/issues/46
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|