2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-28 00:24:18 +00:00
nixpkgs/pkgs/development/libraries/rubberband/default.nix
Cody P Schafer ec40574149
rubberband: fix build on darwin
rubberband's build uses apple's Accelerate framework for it's FFT by
default on darwin. We could either tell it to use the built-in fft (the
code that is used on linux) or add the dependencies on the Apple
frameworks.

This change adds the appropriate dependencies for darwin to build with
rubberband's default configuration.
2022-08-23 22:29:07 -04:00

27 lines
1.0 KiB
Nix

{ lib, stdenv, fetchurl, pkg-config, libsamplerate, libsndfile, fftw
, vamp-plugin-sdk, ladspaH, meson, ninja, darwin }:
stdenv.mkDerivation rec {
pname = "rubberband";
version = "2.0.2";
src = fetchurl {
url = "https://breakfastquay.com/files/releases/${pname}-${version}.tar.bz2";
sha256 = "sha256-uerAJ+eXeJrplhHJ6urxw6RMyAT5yKBEGg0dJvPWvfk=";
};
nativeBuildInputs = [ pkg-config meson ninja ];
buildInputs = [ libsamplerate libsndfile fftw vamp-plugin-sdk ladspaH ] ++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [Accelerate CoreGraphics CoreVideo]);
makeFlags = [ "AR:=$(AR)" ];
meta = with lib; {
description = "High quality software library for audio time-stretching and pitch-shifting";
homepage = "https://breakfastquay.com/rubberband/";
# commercial license available as well, see homepage. You'll get some more optimized routines
license = licenses.gpl2Plus;
maintainers = [ maintainers.goibhniu maintainers.marcweber ];
platforms = platforms.all;
};
}