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