summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2022-08-05 00:49:57 +0100
committerThiago Kenji Okada <thiagokokada@gmail.com>2022-08-08 10:32:07 +0100
commitb8dc7a5e88a82d218fddf6c14a6ccfc830fd296e (patch)
treebdd7903445d30b7102d80d9c1bad0fee9ea80c6e
parentf73b6e98b1e89810700c610c4c76c4715e1e63bc (diff)
audacious: migrate to meson build system, refactor
Separate the derivation in `audacious` and `audacious-plugins`. Since one derivation depends on the other, we first build `audacious` without the `audacious-plugins`, them we build `audacious-plugins` and finally we build the final version of `audacious`. Also, add myself as maintainer.
-rw-r--r--pkgs/applications/audio/audacious/0001-Set-plugindir-to-PREFIX-lib-audacious.patch25
-rw-r--r--pkgs/applications/audio/audacious/default.nix76
-rw-r--r--pkgs/applications/audio/audacious/plugins.nix109
-rw-r--r--pkgs/top-level/all-packages.nix4
4 files changed, 169 insertions, 45 deletions
diff --git a/pkgs/applications/audio/audacious/0001-Set-plugindir-to-PREFIX-lib-audacious.patch b/pkgs/applications/audio/audacious/0001-Set-plugindir-to-PREFIX-lib-audacious.patch
new file mode 100644
index 000000000000..49f1208eb117
--- /dev/null
+++ b/pkgs/applications/audio/audacious/0001-Set-plugindir-to-PREFIX-lib-audacious.patch
@@ -0,0 +1,25 @@
+From b64b03be9edf23a80fce0c76de61ffff0914ddce Mon Sep 17 00:00:00 2001
+From: Thiago Kenji Okada <thiagokokada@gmail.com>
+Date: Mon, 8 Aug 2022 10:28:33 +0100
+Subject: [PATCH] Set plugindir to $PREFIX/lib/audacious
+
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 3f7996f72..ab09d6476 100644
+--- a/meson.build
++++ b/meson.build
+@@ -160,7 +160,7 @@ if (cxx.has_header('libintl.h'))
+ endif
+
+
+-install_plugindir = audacious_dep.get_variable(pkgconfig: 'plugin_dir')
++install_plugindir = join_paths(get_option('prefix'), 'lib/audacious')
+
+
+ conf.set_quoted('INSTALL_PLUGINDIR', install_plugindir)
+--
+2.36.0
+
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
index 7ccdc4eced67..eb404041d973 100644
--- a/pkgs/applications/audio/audacious/default.nix
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -1,15 +1,16 @@
-{
- mkDerivation, lib, fetchurl, fetchpatch,
- gettext, pkg-config,
- qtbase,
- alsa-lib, curl, faad2, ffmpeg, flac, fluidsynth, gdk-pixbuf, lame, libbs2b,
- libcddb, libcdio, libcdio-paranoia, libcue, libjack2, libmad, libmms, libmodplug,
- libmowgli, libnotify, libogg, libpulseaudio, libsamplerate, libsidplayfp,
- libsndfile, libvorbis, libxml2, lirc, mpg123, neon, qtmultimedia, soxr,
- wavpack, libopenmpt
+{ lib
+, stdenv
+, audacious-plugins
+, fetchurl
+, gettext
+, meson
+, ninja
+, pkg-config
+, qtbase
+, wrapQtAppsHook
}:
-mkDerivation rec {
+stdenv.mkDerivation rec {
pname = "audacious";
version = "4.2";
@@ -17,54 +18,39 @@ mkDerivation rec {
url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
sha256 = "sha256-/rME5HCkgf4rPEyhycs7I+wmJUDBLQ0ebCKl62JeBLM=";
};
- pluginsSrc = fetchurl {
- url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
- sha256 = "sha256-b6D2nDoQQeuHfDcQlROrSioKVqd9nowToVgc8UOaQX8=";
- };
- nativeBuildInputs = [ gettext pkg-config ];
+ nativeBuildInputs = [
+ gettext
+ meson
+ ninja
+ pkg-config
+ wrapQtAppsHook
+ ];
buildInputs = [
- # Core dependencies
qtbase
-
- # Plugin dependencies
- alsa-lib curl faad2 ffmpeg flac fluidsynth gdk-pixbuf lame libbs2b libcddb
- libcdio libcdio-paranoia libcue libjack2 libmad libmms libmodplug libmowgli
- libnotify libogg libpulseaudio libsamplerate libsidplayfp libsndfile
- libvorbis libxml2 lirc mpg123 neon qtmultimedia soxr wavpack
- libopenmpt
];
- configureFlags = [ "--disable-gtk" ];
+ mesonFlags = [
+ "-Dgtk=false"
+ "-Dbuildstamp=NixOS"
+ ];
- # Here we build both audacious and audacious-plugins in one
- # derivation, since they really expect to be in the same prefix.
- # This is slighly tricky.
- builder = builtins.toFile "builder.sh" ''
- # First build audacious.
- (
- source $stdenv/setup
- genericBuild
- )
- # Then build the plugins.
- (
- nativeBuildInputs="$out $nativeBuildInputs" # to find audacious
- source $stdenv/setup
- rm -rfv audacious-*
- src=$pluginsSrc
- genericBuild
- )
+ postInstall = lib.optionalString (audacious-plugins != null) ''
+ ln -s ${audacious-plugins}/lib/audacious $out/lib
'';
meta = with lib; {
- description = "Audio player";
+ description = "A lightweight and versatile audio player";
homepage = "https://audacious-media-player.org/";
- maintainers = with maintainers; [ eelco ramkromberg ttuegel ];
+ maintainers = with maintainers; [ eelco ramkromberg ttuegel thiagokokada ];
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
+ bsd2
+ bsd3 #https://github.com/audacious-media-player/audacious/blob/master/COPYING
+ gpl2
+ gpl3
+ lgpl2Plus #http://redmine.audacious-media-player.org/issues/46
];
};
}
diff --git a/pkgs/applications/audio/audacious/plugins.nix b/pkgs/applications/audio/audacious/plugins.nix
new file mode 100644
index 000000000000..3f0bcaca6422
--- /dev/null
+++ b/pkgs/applications/audio/audacious/plugins.nix
@@ -0,0 +1,109 @@
+{ stdenv
+, fetchurl
+, alsa-lib
+, audacious
+, curl
+, faad2
+, ffmpeg
+, flac
+, fluidsynth
+, gdk-pixbuf
+, gettext
+, lame
+, libbs2b
+, libcddb
+, libcdio
+, libcdio-paranoia
+, libcue
+, libjack2
+, libmad
+, libmms
+, libmodplug
+, libmowgli
+, libnotify
+, libogg
+, libopenmpt
+, libpulseaudio
+, libsamplerate
+, libsidplayfp
+, libsndfile
+, libvorbis
+, libxml2
+, lirc
+, meson
+, mpg123
+, neon
+, ninja
+, pkg-config
+, qtbase
+, qtmultimedia
+, soxr
+, wavpack
+}:
+
+stdenv.mkDerivation rec {
+ pname = "audacious-plugins";
+ version = "4.2";
+
+ src = fetchurl {
+ url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
+ sha256 = "sha256-b6D2nDoQQeuHfDcQlROrSioKVqd9nowToVgc8UOaQX8=";
+ };
+
+ patches = [ ./0001-Set-plugindir-to-PREFIX-lib-audacious.patch ];
+
+ nativeBuildInputs = [
+ gettext
+ meson
+ ninja
+ pkg-config
+ ];
+
+ buildInputs = [
+ audacious
+ alsa-lib
+ curl
+ faad2
+ ffmpeg
+ flac
+ fluidsynth
+ gdk-pixbuf
+ lame
+ libbs2b
+ libcddb
+ libcdio
+ libcdio-paranoia
+ libcue
+ libjack2
+ libmad
+ libmms
+ libmodplug
+ libmowgli
+ libnotify
+ libogg
+ libpulseaudio
+ libsamplerate
+ libsidplayfp
+ libsndfile
+ libvorbis
+ libxml2
+ lirc
+ mpg123
+ neon
+ qtbase
+ qtmultimedia
+ soxr
+ wavpack
+ libopenmpt
+ ];
+
+ mesonFlags = [
+ "-Dgtk=false"
+ ];
+
+ dontWrapQtApps = true;
+
+ meta = audacious.meta // {
+ description = "Plugins for Audacious music player";
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9653332e904d..1ff5457c0ed8 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -25959,6 +25959,10 @@ with pkgs;
aucatctl = callPackage ../applications/audio/aucatctl { };
audacious = libsForQt5.callPackage ../applications/audio/audacious { };
+ audacious-plugins = libsForQt5.callPackage ../applications/audio/audacious/plugins.nix {
+ # Avoid circular dependency
+ audacious = audacious.override { audacious-plugins = null; };
+ };
audaciousQt5 = audacious;
audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk2; };