summary refs log tree commit diff
path: root/pkgs/applications/audio/audacious/default.nix
blob: 08548aa8b57b0ceac418e03b80c9657457651512 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ stdenv, fetchurl, pkgconfig, glib, gtk, libmowgli, libmcs
, gettext, dbus_glib, libxml2, libmad, xlibs, alsaLib, libogg
, libvorbis, libcdio, libcddb, flac, ffmpeg
}:

stdenv.mkDerivation rec {
  name = "audacious-2.3";
  
  src = fetchurl {
    url = "http://distfiles.atheme.org/${name}.tgz";
    sha256 = "0vs16y1vrlkzcbaw8imc36b9lncva69zkdkp38ikbidssiskm6xi";
  };

  pluginsSrc = fetchurl {
    url = "http://distfiles.atheme.org/audacious-plugins-2.3.tgz";
    sha256 = "0hdami52qpiyim3nz3qnml85wgjzpmx6g2wahfnsdvncmhm4v93x";
  };
  
  # `--enable-amidiplug' is to prevent configure from looking in /proc/asound.
  configureFlags = "--enable-amidiplug";
  
  buildInputs =
    [ gettext pkgconfig glib gtk libmowgli libmcs libxml2 dbus_glib
      libmad xlibs.libXcomposite libogg libvorbis flac alsaLib libcdio
      libcddb ffmpeg
    ];

  # Here we build bouth 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"
    ''
      # First build audacious.
      (
        source $stdenv/setup
        genericBuild
      )

      # Then build the plugins.
      (
        buildNativeInputs="$out $buildNativeInputs" # to find audacious
        source $stdenv/setup
        rm -rfv audacious-*
        src=$pluginsSrc
        genericBuild
      )
    '';

  meta = {
    description = "Audacious, a media player forked from the Beep Media Player, which was itself an XMMS fork";
    homepage = http://audacious-media-player.org/;
    maintainers = [ stdenv.lib.maintainers.eelco ];
  };
}