1{ stdenv, buildPythonPackage, fetchPypi
2, fftw, fftwFloat, fftwLongDouble, numpy, scipy }:
3
4buildPythonPackage rec {
5 version = "0.10.4";
6 pname = "pyFFTW";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a";
11 };
12
13 buildInputs = [ fftw fftwFloat fftwLongDouble];
14
15 propagatedBuildInputs = [ numpy scipy ];
16
17 # Tests cannot import pyfftw. pyfftw works fine though.
18 doCheck = false;
19
20 preConfigure = ''
21 export LDFLAGS="-L${fftw.out}/lib -L${fftwFloat.out}/lib -L${fftwLongDouble.out}/lib"
22 export CFLAGS="-I${fftw.dev}/include -I${fftwFloat.dev}/include -I${fftwLongDouble.dev}/include"
23 '';
24 #+ optionalString isDarwin ''
25 # export DYLD_LIBRARY_PATH="${pkgs.fftw.out}/lib"
26 #'';
27
28 meta = with stdenv.lib; {
29 description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
30 homepage = http://hgomersall.github.com/pyFFTW/;
31 license = with licenses; [ bsd2 bsd3 ];
32 maintainers = with maintainers; [ fridh ];
33 };
34}