2021-06-10 02:57:09 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, libjack2, libpulseaudio, AudioUnit }:
|
2015-09-03 23:56:17 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-27 22:16:14 +00:00
|
|
|
version = "2.0.0";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libsoundio";
|
2015-09-03 23:56:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andrewrk";
|
|
|
|
repo = "libsoundio";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2019-03-27 22:16:14 +00:00
|
|
|
sha256 = "12l4rvaypv87vigdrmjz48d4d6sq4gfxf5asvnc4adyabxb73i4x";
|
2015-09-03 23:56:17 +00:00
|
|
|
};
|
|
|
|
|
2017-12-21 04:56:50 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-08-29 22:54:35 +00:00
|
|
|
buildInputs = [ libjack2 ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optional stdenv.isDarwin AudioUnit;
|
2017-12-21 04:56:50 +00:00
|
|
|
|
2022-08-29 22:54:35 +00:00
|
|
|
cmakeFlags = lib.optionals stdenv.isDarwin [
|
|
|
|
"-DBUILD_TESTS=OFF"
|
|
|
|
];
|
|
|
|
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes";
|
2015-09-03 23:56:17 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2015-09-03 23:56:17 +00:00
|
|
|
description = "Cross platform audio input and output";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://libsound.io/";
|
2015-09-03 23:56:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.andrewrk ];
|
|
|
|
};
|
|
|
|
}
|