Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / soundfile / default.nix
blobdea0e345a9997374409a98d8c564c4c77fb1662e
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , pytest
5 , numpy
6 , libsndfile
7 , cffi
8 , isPyPy
9 , stdenv
12 buildPythonPackage rec {
13   pname = "soundfile";
14   version = "0.10.3.post1";
16   src = fetchPypi {
17     pname = "SoundFile";
18     inherit version;
19     sha256 = "0yqhrfz7xkvqrwdxdx2ydy4h467sk7z3gf984y1x2cq7cm1gy329";
20   };
22     checkInputs = [ pytest ];
23     propagatedBuildInputs = [ numpy libsndfile cffi ];
25     meta = {
26       description = "An audio library based on libsndfile, CFFI and NumPy";
27       license = lib.licenses.bsd3;
28       homepage = "https://github.com/bastibe/PySoundFile";
29       maintainers = with lib.maintainers; [ fridh ];
30     };
32     postPatch = ''
33       substituteInPlace soundfile.py --replace "_find_library('sndfile')" "'${libsndfile.out}/lib/libsndfile${stdenv.hostPlatform.extensions.sharedLibrary}'"
34     '';
36     # https://github.com/bastibe/PySoundFile/issues/157
37     disabled = isPyPy ||  stdenv.isi686;