diff options
author | markuskowa <markus.kowalewski@gmail.com> | 2024-01-18 13:19:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 13:19:21 +0100 |
commit | f6e0a8891cc412de8f2cb882fbb2bd06e84f48c4 (patch) | |
tree | e421858ca4685fa3e55678a974cdc02d131e3c4c /pkgs | |
parent | ff0b012df767081b61798c97def0ba3c701c95ea (diff) | |
parent | 1bb7e6e5d30c45e51267ac6737a89537f238fc8d (diff) |
Merge pull request #280309 from hmenke/mpip
pfft: init at 1.0.8-alpha; pnfft: init at 1.0.7-alpha
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/pf/pfft/package.nix | 52 | ||||
-rw-r--r-- | pkgs/by-name/pn/pnfft/package.nix | 53 |
2 files changed, 105 insertions, 0 deletions
diff --git a/pkgs/by-name/pf/pfft/package.nix b/pkgs/by-name/pf/pfft/package.nix new file mode 100644 index 0000000000000..7e91b7d288966 --- /dev/null +++ b/pkgs/by-name/pf/pfft/package.nix @@ -0,0 +1,52 @@ +{ autoreconfHook +, fetchFromGitHub +, fftwMpi +, lib +, llvmPackages +, mpi +, precision ? "double" +, stdenv +}: + +assert lib.elem precision [ "single" "double" "long-double" ]; + +let + fftw' = fftwMpi.override { inherit precision; }; +in +stdenv.mkDerivation (finalAttrs: { + pname = "pfft-${precision}"; + version = "1.0.8-alpha"; + + src = fetchFromGitHub { + owner = "mpip"; + repo = "pfft"; + rev = "v${finalAttrs.version}"; + hash = "sha256-T5nPlkPKjYYRCuT1tSzXNJTPs/o6zwJMv9lPCWOwabw="; + }; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ autoreconfHook ]; + + preConfigure = '' + export FCFLAGS="-I${lib.getDev fftw'}/include" + ''; + + configureFlags = [ + "--enable-portable-binary" + ] ++ lib.optional (precision != "double") "--enable-${precision}"; + + buildInputs = lib.optional stdenv.cc.isClang llvmPackages.openmp; + + propagatedBuildInputs = [ fftw' mpi ]; + + doCheck = true; + + meta = { + description = "Parallel fast Fourier transforms"; + homepage = "https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software.php.en#pfft"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ hmenke ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/by-name/pn/pnfft/package.nix b/pkgs/by-name/pn/pnfft/package.nix new file mode 100644 index 0000000000000..43890b217e626 --- /dev/null +++ b/pkgs/by-name/pn/pnfft/package.nix @@ -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; + }; +}) |