summary refs log tree commit diff
path: root/pkgs/development/libraries/pcaudiolib/default.nix
blob: 2cfd0ab58bd1072533b87db648b8b11595ee1e7e (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
{ config, stdenv, lib, fetchFromGitHub
, autoconf, automake, which, libtool, pkg-config
, portaudio, alsa-lib
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio }:

stdenv.mkDerivation rec {
  pname = "pcaudiolib";
  version = "1.1";

  src = fetchFromGitHub {
    owner = "espeak-ng";
    repo = "pcaudiolib";
    rev = version;
    sha256 = "0c55hlqqh0m7bcb3nlgv1s4a22s5bgczr1cakjh3767rjb10khi0";
  };

  nativeBuildInputs = [ autoconf automake which libtool pkg-config ];

  buildInputs = [ portaudio ]
    ++ lib.optionals stdenv.isLinux [ alsa-lib ]
    ++ lib.optionals pulseaudioSupport [ libpulseaudio ];

  preConfigure = "./autogen.sh";

  meta = with lib; {
    broken = stdenv.isDarwin;
    description = "Provides a C API to different audio devices";
    homepage = "https://github.com/espeak-ng/pcaudiolib";
    license = licenses.gpl3;
    maintainers = with maintainers; [ aske ];
    platforms = platforms.all;
  };
}