mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.3 KiB
Nix
45 lines
1.3 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 ];
|
|
};
|
|
}
|