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
|
2021-06-28 23:13:55 +00:00
|
|
|
, portaudio, alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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 ]
|
2021-06-28 23:13:55 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ alsa-lib ]
|
2020-12-29 15:07:52 +00:00
|
|
|
++ 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; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
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
|
|
|
};
|
|
|
|
}
|