{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , hip , git , rocfft , gtest , boost , fftw , fftwFloat , openmp , buildTests ? false , buildBenchmarks ? false , buildSamples ? false }: # Can also use cuFFT stdenv.mkDerivation (finalAttrs: { pname = "hipfft"; version = "5.4.2"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ] ++ lib.optionals buildSamples [ "sample" ]; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "hipFFT"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-yDtm9J0wqH6zo4HcgQbqhvwbzbOiJPQ48gJ2gC8PvjA="; fetchSubmodules = true; }; nativeBuildInputs = [ hip 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=${hip}/lib/cmake/hip" "-DHIP_ROOT_DIR=${hip}" "-DHIP_PATH=${hip}" # Manually define CMAKE_INSTALL_