forked from mirrors/nixpkgs
f9fdf2d402
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
34 lines
898 B
Nix
34 lines
898 B
Nix
{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, libjack2, libpulseaudio, AudioUnit }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "2.0.0";
|
|
pname = "libsoundio";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "andrewrk";
|
|
repo = "libsoundio";
|
|
rev = version;
|
|
sha256 = "12l4rvaypv87vigdrmjz48d4d6sq4gfxf5asvnc4adyabxb73i4x";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libjack2 ]
|
|
++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib ]
|
|
++ lib.optional stdenv.isDarwin AudioUnit;
|
|
|
|
cmakeFlags = lib.optionals stdenv.isDarwin [
|
|
"-DBUILD_TESTS=OFF"
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes";
|
|
|
|
meta = with lib; {
|
|
description = "Cross platform audio input and output";
|
|
homepage = "http://libsound.io/";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
maintainers = [ maintainers.andrewrk ];
|
|
};
|
|
}
|