{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , clr , git , rocfft , gtest , boost , fftw , fftwFloat , openmp , buildTests ? false , buildBenchmarks ? false , buildSamples ? false , gpuTargets ? [ ] }: # Can also use cuFFT stdenv.mkDerivation (finalAttrs: { pname = "hipfft"; version = "5.7.1"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ] ++ lib.optionals buildSamples [ "sample" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "hipFFT"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-fuYRKdlTrRMwxr3cgMeT3YniPzs4nuvF8YCzr3LLPFM="; fetchSubmodules = true; }; nativeBuildInputs = [ clr git cmake rocm-cmake ]; buildInputs = [ rocfft ] ++ lib.optionals (buildTests || buildBenchmarks || buildSamples) [ gtest boost fftw fftwFloat openmp ]; cmakeFlags = [ "-DCMAKE_C_COMPILER=hipcc" "-DCMAKE_CXX_COMPILER=hipcc" "-DCMAKE_MODULE_PATH=${clr}/lib/cmake/hip" "-DHIP_ROOT_DIR=${clr}" "-DHIP_PATH=${clr}" # Manually define CMAKE_INSTALL_