2020-04-24 23:36:52 +00:00
|
|
|
{ config, stdenv, lib, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, autoconf, automake, which, libtool, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake which libtool pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|