13 , buildBenchmarks ? false
16 assert buildTests -> gtest != null;
18 # Doesn't seem to work, thousands of errors compiling with no clear fix
19 # Is this an upstream issue? We don't seem to be missing dependencies
20 assert buildTests == false;
21 assert buildBenchmarks == false;
23 stdenv.mkDerivation rec {
25 rocmVersion = "5.3.1";
26 version = "2.16.0-${rocmVersion}";
28 # Comment out these outputs until tests/benchmarks are fixed (upstream?)
31 # ] ++ lib.optionals buildTests [
33 # ] ++ lib.optionals buildBenchmarks [
37 src = fetchFromGitHub {
38 owner = "ROCmSoftwarePlatform";
40 rev = "rocm-${rocmVersion}";
41 hash = "sha256-cT0VyEVz86xR6qubAY2ncTxtCRTwXrNTWcFyf3mV+y0=";
55 ] ++ lib.optionals buildTests [
60 "-DCMAKE_CXX_COMPILER=hipcc"
61 "-DHIP_ROOT_DIR=${hip}"
62 # Manually define CMAKE_INSTALL_<DIR>
63 # See: https://github.com/NixOS/nixpkgs/pull/197838
64 "-DCMAKE_INSTALL_BINDIR=bin"
65 "-DCMAKE_INSTALL_LIBDIR=lib"
66 "-DCMAKE_INSTALL_INCLUDEDIR=include"
67 ] ++ lib.optionals buildTests [
69 ] ++ lib.optionals buildBenchmarks [
70 "-DBUILD_BENCHMARKS=ON"
73 # Comment out these outputs until tests/benchmarks are fixed (upstream?)
74 # postInstall = lib.optionalString buildTests ''
76 # mv $out/bin/test_* $test/bin
77 # '' + lib.optionalString buildBenchmarks ''
78 # mkdir -p $benchmark/bin
79 # mv $out/bin/benchmark_* $benchmark/bin
80 # '' + lib.optionalString (buildTests || buildBenchmarks) ''
85 description = "ROCm parallel algorithm library";
86 homepage = "https://github.com/ROCmSoftwarePlatform/rocThrust";
87 license = with licenses; [ asl20 ];
88 maintainers = with maintainers; [ Madouura ];
89 broken = rocmVersion != hip.version;