2017-10-29 12:23:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, numpy
|
|
|
|
, libsndfile
|
|
|
|
, cffi
|
|
|
|
, isPyPy
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-06-23 14:32:05 +01:00
|
|
|
pname = "soundfile";
|
2019-12-09 15:20:07 +00:00
|
|
|
version = "0.10.3.post1";
|
2017-10-29 12:23:55 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2019-06-23 14:32:05 +01:00
|
|
|
pname = "SoundFile";
|
|
|
|
inherit version;
|
2019-12-09 15:20:07 +00:00
|
|
|
sha256 = "0yqhrfz7xkvqrwdxdx2ydy4h467sk7z3gf984y1x2cq7cm1gy329";
|
2017-10-29 12:23:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
propagatedBuildInputs = [ numpy libsndfile cffi ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An audio library based on libsndfile, CFFI and NumPy";
|
|
|
|
license = lib.licenses.bsd3;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/bastibe/PySoundFile";
|
2017-10-29 12:23:55 +00:00
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
|
|
|
|
2019-06-23 14:32:05 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace soundfile.py --replace "_find_library('sndfile')" "'${libsndfile.out}/lib/libsndfile${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
2017-10-29 12:23:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# https://github.com/bastibe/PySoundFile/issues/157
|
|
|
|
disabled = isPyPy || stdenv.isi686;
|
2019-06-23 14:32:05 +01:00
|
|
|
|
2017-11-09 11:26:09 +00:00
|
|
|
}
|