13 , pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
16 stdenv.mkDerivation (finalAttrs: {
20 src = fetchFromGitHub {
22 repo = finalAttrs.pname;
23 rev = finalAttrs.version;
24 hash = "sha256-ZG/HBk5DHaZP/H3M01vDr3M2nP9awwsPuKpwtalz3EE=";
38 ++ lib.optional stdenv.isLinux alsa-lib
39 ++ lib.optional pulseaudioSupport libpulseaudio;
41 # touch ChangeLog to avoid below error on darwin:
42 # Makefile.am: error: required file './ChangeLog.md' not found
43 preConfigure = lib.optionalString stdenv.isDarwin ''
50 homepage = "https://github.com/espeak-ng/pcaudiolib";
51 description = "Provides a C API to different audio devices";
52 license = licenses.gpl3Plus;
53 maintainers = with maintainers; [ aske ];
54 platforms = platforms.unix;