2022-07-09 14:06:18 +00:00
|
|
|
{ config
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, alsa-lib
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, libpulseaudio
|
|
|
|
, libtool
|
|
|
|
, pkg-config
|
|
|
|
, portaudio
|
|
|
|
, which
|
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
|
|
|
}:
|
2016-09-04 23:32:31 +00:00
|
|
|
|
2022-07-09 14:06:18 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "pcaudiolib";
|
2022-07-09 14:06:18 +00:00
|
|
|
version = "1.2";
|
2016-09-04 23:32:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-12-27 09:21:00 +00:00
|
|
|
owner = "espeak-ng";
|
2022-07-09 14:06:18 +00:00
|
|
|
repo = finalAttrs.pname;
|
|
|
|
rev = finalAttrs.version;
|
|
|
|
hash = "sha256-ZG/HBk5DHaZP/H3M01vDr3M2nP9awwsPuKpwtalz3EE=";
|
2016-09-04 23:32:31 +00:00
|
|
|
};
|
|
|
|
|
2022-07-09 14:06:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
];
|
2016-09-04 23:32:31 +00:00
|
|
|
|
2022-07-09 14:06:18 +00:00
|
|
|
buildInputs = [
|
|
|
|
portaudio
|
|
|
|
]
|
|
|
|
++ lib.optional stdenv.isLinux alsa-lib
|
|
|
|
++ lib.optional pulseaudioSupport libpulseaudio;
|
2016-09-04 23:32:31 +00:00
|
|
|
|
2022-07-09 14:06:18 +00:00
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
2016-09-04 23:32:31 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-12-27 09:21:00 +00:00
|
|
|
homepage = "https://github.com/espeak-ng/pcaudiolib";
|
2022-07-09 14:06:18 +00:00
|
|
|
description = "Provides a C API to different audio devices";
|
|
|
|
license = licenses.gpl3Plus;
|
2016-09-04 23:32:31 +00:00
|
|
|
maintainers = with maintainers; [ aske ];
|
2022-07-09 14:06:18 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
badPlatforms = platforms.darwin;
|
2016-09-04 23:32:31 +00:00
|
|
|
};
|
2022-07-09 14:06:18 +00:00
|
|
|
})
|