nixpkgs/pkgs/by-name/cl/clfft/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

64 lines
1.4 KiB
Nix

{
lib,
gccStdenv,
fetchFromGitHub,
cmake,
fftw,
fftwFloat,
boost,
opencl-clhpp,
ocl-icd,
darwin,
}:
let
inherit (darwin.apple_sdk.frameworks) OpenCL;
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
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ OpenCL ];
# 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 ];
};
}