1 { lib, stdenv, fetchurl, fetchpatch, libogg, libvorbis, libao, pkg-config, curl, libiconv
5 stdenv.mkDerivation rec {
6 pname = "vorbis-tools";
10 url = "http://downloads.xiph.org/releases/vorbis/vorbis-tools-${version}.tar.gz";
11 sha256 = "1c7h4ivgfdyygz2hyh6nfibxlkz8kdk868a576qkkjgj5gn78xyv";
14 patches = lib.optionals stdenv.cc.isClang [
15 # Fixes a call to undeclared function `utf8_decode`.
16 # https://github.com/xiph/vorbis-tools/pull/33
18 url = "https://github.com/xiph/vorbis-tools/commit/8a645f78b45ae7e370c0dc2a52d0f2612aa6110b.patch";
19 hash = "sha256-RkT9Xa0pRu/oO9E9qhDa17L0luWgYHI2yINIkPZanmI=";
23 # ld64 on darwin doesn't support nested archives and as the nested lib
24 # (libbase64.a) is not required to build so leave it out
25 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
26 substituteInPlace share/Makefile.am \
27 --replace-fail libpicture_a_LIBADD '#libpicture_a_LIBADD'
30 nativeBuildInputs = [ autoreconfHook pkg-config ];
31 buildInputs = [ libogg libvorbis libao curl speex flac ]
32 ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
35 description = "Extra tools for Ogg-Vorbis audio codec";
37 A set of command-line tools to manipulate Ogg Vorbis audio
38 files, notably the `ogg123' player and the `oggenc' encoder.
40 homepage = "https://xiph.org/vorbis/";
41 license = licenses.gpl2;
42 platforms = platforms.all;