From 5ded1fb645ff6acd687707e1eb404ff6082f9321 Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Sun, 14 Oct 2012 23:48:46 -0700 Subject: [PATCH 1/3] - icecast-2.3.3, libshout-2.3.1 --- .../libraries/libshout/default.nix | 30 +++++++++++++++++ pkgs/servers/icecast/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 3 files changed, 66 insertions(+) create mode 100644 pkgs/development/libraries/libshout/default.nix create mode 100644 pkgs/servers/icecast/default.nix diff --git a/pkgs/development/libraries/libshout/default.nix b/pkgs/development/libraries/libshout/default.nix new file mode 100644 index 00000000000..45528829cc3 --- /dev/null +++ b/pkgs/development/libraries/libshout/default.nix @@ -0,0 +1,30 @@ +{stdenv, fetchurl, pkgconfig +, libvorbis, libtheora, speex}: + +# need pkgconfig so that libshout installs ${out}/lib/pkgconfig/shout.pc + +stdenv.mkDerivation { + name = "libshout-2.3.1"; + + src = fetchurl { + url = "http://downloads.xiph.org/releases/libshout/${name}.tar.gz"; + sha256 = "cf3c5f6b4a5e3fcfbe09fb7024aa88ad4099a9945f7cb037ec06bcee7a23926e"; + }; + + buildInputs = [ libvorbis libtheora speex pkgconfig ]; + + meta = { + description = "icecast 'c' language bindings"; + + longDescription = '' + Libshout is a library for communicating with and sending data to an icecast + server. It handles the socket connection, the timing of the data, and prevents + bad data from getting to the icecast server. + ''; + + homepage = http://www.icecast.org; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; + + }; +} diff --git a/pkgs/servers/icecast/default.nix b/pkgs/servers/icecast/default.nix new file mode 100644 index 00000000000..24ae245a8a0 --- /dev/null +++ b/pkgs/servers/icecast/default.nix @@ -0,0 +1,32 @@ +{stdenv, fetchurl +, libxml2, libxslt, curl +, libvorbis, libtheora, speex, libkate }: + +stdenv.mkDerivation rec { + name = "icecast-2.3.3"; + + src = fetchurl { + url = "http://downloads.xiph.org/releases/icecast/${name}.tar.gz"; + sha256 = "0vf38mk13z1czpbj0g8va4rzjf201slqmiwcs8y9i6iwz3shc78v"; + }; + + buildInputs = [ libxml2 libxslt curl libvorbis libtheora speex libkate ]; + + meta = { + description = "icecast is free server software for streaming multimedia."; + + longDescription = '' + Icecast is a streaming media server which currently supports Ogg Vorbis and MP3 + audio streams. It can be used to create an Internet radio station or a + privately running jukebox and many things in between. It is very versatile in + that new formats can be added relatively easily and supports open standards for + commuincation and interaction. + ''; + + + homepage = http://www.icecast.org; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8bbe6bc588d..11dd996f927 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -907,6 +907,8 @@ let iasl = callPackage ../development/compilers/iasl { }; + icecast = callPackage ../servers/icecast { }; + icoutils = callPackage ../tools/graphics/icoutils { }; idutils = callPackage ../tools/misc/idutils { }; @@ -1000,6 +1002,8 @@ let libtirpc = callPackage ../development/libraries/ti-rpc { }; + libshout = callPackage ../development/libraries/libshout { }; + libtorrent = callPackage ../tools/networking/p2p/libtorrent { }; logcheck = callPackage ../tools/system/logcheck { From 8ba64338f71fc2f60b6c25da2b58ef9c75314290 Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Sun, 21 Oct 2012 21:59:23 -0700 Subject: [PATCH 2/3] as we dereference a variable in a string, the expression needs to be recursive. --- pkgs/development/libraries/libshout/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libshout/default.nix b/pkgs/development/libraries/libshout/default.nix index 45528829cc3..760b8ecce09 100644 --- a/pkgs/development/libraries/libshout/default.nix +++ b/pkgs/development/libraries/libshout/default.nix @@ -3,7 +3,7 @@ # need pkgconfig so that libshout installs ${out}/lib/pkgconfig/shout.pc -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "libshout-2.3.1"; src = fetchurl { From ccfb0562558b87dc39a695da54e5fbc33b552ad8 Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Wed, 24 Oct 2012 18:15:48 -0700 Subject: [PATCH 3/3] shoutcast support for mpd --- pkgs/servers/mpd/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index 0c3257d61c3..a5cc810ada8 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -2,16 +2,18 @@ , flacSupport ? true, flac, vorbisSupport ? true, libvorbis , madSupport ? true, libmad, id3tagSupport ? true, libid3tag , mikmodSupport ? true, libmikmod, cueSupport ? true, libcue +, shoutSupport ? true, libshout }: let opt = stdenv.lib.optional; in stdenv.mkDerivation rec { - name = "mpd-0.16.3"; + name = "mpd-0.16.8"; src = fetchurl { url = "mirror://sourceforge/musicpd/${name}.tar.bz2"; - sha256 = "1liihxj58f944gapdqg15firl6phbxh3y3vjxq9m8dlvm37pkpsq"; + sha256 = "35183ae4a706391f5d739e4378b74f516952adda09a260fecfd531a58b0fff17"; }; + buildInputs = [ pkgconfig glib ] ++ opt alsaSupport alsaLib ++ opt flacSupport flac @@ -19,7 +21,9 @@ stdenv.mkDerivation rec { ++ opt madSupport libmad ++ opt id3tagSupport libid3tag ++ opt mikmodSupport libmikmod - ++ opt cueSupport libcue; + ++ opt cueSupport libcue + ++ opt shoutSupport libshout; + configureFlags = '' ${if alsaSupport then "--enable-alsa" else "--disable-alsa"} ${if flacSupport then "--enable-flac" else "--disable-flac"} @@ -28,7 +32,13 @@ stdenv.mkDerivation rec { ${if mikmodSupport then "--enable-mikmod" else "--disable-mikmod"} ${if id3tagSupport then "--enable-id3" else "--disable-id3"} ${if cueSupport then "--enable-cue" else "--disable-cue"} + ${if shoutSupport then "--enable-shout" else "--disable-shout"} ''; + + NIX_LDFLAGS = '' + ${if shoutSupport then "-lshout" else ""} + ''; + meta = { description = "A flexible, powerful daemon for playing music"; longDescription = ''