about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libao
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libao')
-rw-r--r--nixpkgs/pkgs/development/libraries/libao/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libao/default.nix b/nixpkgs/pkgs/development/libraries/libao/default.nix
new file mode 100644
index 000000000000..698182dbd4ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libao/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig, libpulseaudio, alsaLib, libcap
+, CoreAudio, CoreServices, AudioUnit
+, usePulseAudio }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.2";
+  pname = "libao";
+
+  # the github mirror is more up to date than downloads.xiph.org
+  src = fetchFromGitHub {
+    owner  = "xiph";
+    repo   = "libao";
+    rev    = "${version}";
+    sha256 = "0svgk4sc9kdhcsfyvbvgm5vpbg3sfr6z5rliflrw49v3x2i4vxq5";
+  };
+
+  configureFlags = [
+    "--disable-broken-oss"
+    "--enable-alsa-mmap"
+  ];
+
+  outputs = [ "out" "dev" "man" "doc" ];
+
+  buildInputs = [ ] ++
+    lib.optional  usePulseAudio   libpulseaudio ++
+    lib.optionals stdenv.isLinux  [ alsaLib libcap ] ++
+    lib.optionals stdenv.isDarwin [ CoreAudio CoreServices AudioUnit ];
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  meta = with stdenv.lib; {
+    longDescription = ''
+      Libao is Xiph.org's cross-platform audio library that allows
+      programs to output audio using a simple API on a wide variety of
+      platforms.
+    '';
+    homepage = https://xiph.org/ao/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ fuuzetsu ];
+    platforms = with platforms; unix;
+  };
+}