nixpkgs/pkgs/by-name/cl/clfft/package.nix
Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00

61 lines
1.3 KiB
Nix

{
lib,
gccStdenv,
fetchFromGitHub,
cmake,
fftw,
fftwFloat,
boost,
opencl-clhpp,
ocl-icd,
}:
let
stdenv = gccStdenv;
in
stdenv.mkDerivation rec {
pname = "clfft";
version = "2.12.2";
src = fetchFromGitHub {
owner = "clMathLibraries";
repo = "clFFT";
rev = "v${version}";
hash = "sha256-yp7u6qhpPYQpBw3d+VLg0GgMyZONVII8BsBCEoRZm4w=";
};
sourceRoot = "${src.name}/src";
postPatch = ''
sed -i '/-m64/d;/-m32/d' CMakeLists.txt
'';
nativeBuildInputs = [ cmake ];
buildInputs =
[
fftw
fftwFloat
boost
]
++ lib.optionals stdenv.hostPlatform.isLinux [
opencl-clhpp
ocl-icd
];
# https://github.com/clMathLibraries/clFFT/issues/237
CXXFLAGS = "-std=c++98";
meta = with lib; {
description = "Library containing FFT functions written in OpenCL";
longDescription = ''
clFFT is a software library containing FFT functions written in OpenCL.
In addition to GPU devices, the library also supports running on CPU devices to facilitate debugging and heterogeneous programming.
'';
license = licenses.asl20;
homepage = "http://clmathlibraries.github.io/clFFT/";
platforms = platforms.unix;
maintainers = with maintainers; [ chessai ];
};
}