1{
2 lib,
3 buildPythonPackage,
4 numpy,
5 libsamplerate,
6 fetchFromGitHub,
7}:
8
9buildPythonPackage {
10 pname = "scikits-samplerate";
11 version = "0.3.3";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "cournape";
16 repo = "samplerate";
17 rev = "a536c97eb2d6195b5f266ea3cc3a35364c4c2210";
18 hash = "sha256-7x03Q6VXfP9p8HCk15IDZ9HeqTyi5F1AlGX/otdh8VU=";
19 };
20
21 buildInputs = [ libsamplerate ];
22
23 propagatedBuildInputs = [ numpy ];
24
25 preConfigure = ''
26 cat > site.cfg << END
27 [samplerate]
28 library_dirs=${libsamplerate.out}/lib
29 include_dirs=${lib.getDev libsamplerate}/include
30 END
31 '';
32
33 doCheck = false;
34
35 meta = with lib; {
36 homepage = "https://github.com/cournape/samplerate";
37 description = "High quality sampling rate convertion from audio data in numpy arrays";
38 license = licenses.gpl2;
39 };
40}