2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, libjack2, libpulseaudio, AudioUnit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "2.0.0";
|
|
|
|
pname = "libsoundio";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andrewrk";
|
|
|
|
repo = "libsoundio";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "12l4rvaypv87vigdrmjz48d4d6sq4gfxf5asvnc4adyabxb73i4x";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [ libjack2 ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio alsa-lib ]
|
|
|
|
++ lib.optional stdenv.hostPlatform.isDarwin AudioUnit;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
2022-09-09 14:08:57 +00:00
|
|
|
"-DBUILD_TESTS=OFF"
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-strict-prototypes";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Cross platform audio input and output";
|
|
|
|
homepage = "http://libsound.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.andrewrk ];
|
|
|
|
};
|
|
|
|
}
|