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