2020-04-24 23:36:52 +00:00
|
|
|
{ config, stdenv, lib, fetchFromGitHub
|
|
|
|
, autoconf, automake, which, libtool, pkgconfig
|
|
|
|
, portaudio, alsaLib
|
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pcaudiolib";
|
|
|
|
version = "1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-12-29 15:07:52 +00:00
|
|
|
owner = "espeak-ng";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "pcaudiolib";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0c55hlqqh0m7bcb3nlgv1s4a22s5bgczr1cakjh3767rjb10khi0";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf automake which libtool pkgconfig ];
|
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
buildInputs = [ portaudio ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ alsaLib ]
|
|
|
|
++ lib.optionals pulseaudioSupport [ libpulseaudio ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = "./autogen.sh";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Provides a C API to different audio devices";
|
2020-12-29 15:07:52 +00:00
|
|
|
homepage = "https://github.com/espeak-ng/pcaudiolib";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ aske ];
|
2020-12-29 15:07:52 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|