about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/nf/nfft/package.nix
blob: 86acd30d5da8e64a9674d786a27697f2e2c4812e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ autoconf
, automake
, cunit
, fetchFromGitHub
, fftw
, lib
, libtool
, llvmPackages
, stdenv
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "nfft";
  version = "3.5.3";

  src = fetchFromGitHub {
    owner = "NFFT";
    repo = "nfft";
    rev = finalAttrs.version;
    hash = "sha256-HR8ME9PVC+RAv1GIgV2vK6eLU8Wk28+rSzbutThBv3w=";
  };

  nativeBuildInputs = [
    autoconf
    automake
    cunit
    libtool
  ];

  preConfigure = ''
    bash bootstrap.sh
  '';

  configureFlags = [
    "--enable-all"
    "--enable-openmp"
    "--enable-portable-binary"
  ];

  buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];

  propagatedBuildInputs = [ fftw ];

  doCheck = true;

  meta = {
    description = "Nonequispaced fast Fourier transform";
    homepage = "https://www-user.tu-chemnitz.de/~potts/nfft/";
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ hmenke ];
  };
})