pnfft: init at 1.0.7-alpha

This commit is contained in:
Henri Menke 2024-01-09 17:25:33 +01:00
parent 08a19db87f
commit 1bb7e6e5d3
No known key found for this signature in database
GPG key ID: FB7AD61E3D806382

View file

@ -0,0 +1,53 @@
{ autoreconfHook
, fetchurl
, fftwMpi
, gsl
, lib
, llvmPackages
, pfft
, precision ? "double"
, stdenv
}:
assert lib.elem precision [ "single" "double" "long-double" ];
let
fftw' = fftwMpi.override { inherit precision; };
pfft' = pfft.override { inherit precision; };
in
stdenv.mkDerivation (finalAttrs: {
pname = "pnfft-${precision}";
version = "1.0.7-alpha";
src = fetchurl {
url = "https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software/pnfft-${finalAttrs.version}.tar.gz";
hash = "sha256-/aVY/1fuMRl1Q2O7bmc5M4aA0taGD+fcQgCdhVYr1no=";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook ];
preConfigure = ''
export FCFLAGS="-I${lib.getDev fftw'}/include -I${lib.getDev pfft'}/include"
'';
configureFlags = [
"--enable-threads"
"--enable-portable-binary"
] ++ lib.optional (precision != "double") "--enable-${precision}";
buildInputs = [ gsl ] ++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
propagatedBuildInputs = [ pfft' ];
doCheck = true;
meta = {
description = "Parallel nonequispaced fast Fourier transforms";
homepage = "https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software.php.en#pnfft";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ hmenke ];
platforms = lib.platforms.linux;
};
})