16 inherit (cudaPackages) cudatoolkit;
18 hwloc = stdenv.mkDerivation rec {
23 url = "https://download.open-mpi.org/release/hwloc/v${lib.versions.majorMinor version}/hwloc-${version}.tar.gz";
24 sha256 = "1ibw14h9ppg8z3mmkwys8vp699n85kymdz20smjd2iq9b67y80b6";
41 "--disable-plugin-dlopen"
42 "--disable-plugin-ltdl"
45 nativeBuildInputs = [ pkg-config ];
47 enableParallelBuilding = true;
49 outputs = [ "out" "lib" "dev" "doc" "man" ];
53 stdenv.mkDerivation rec {
54 pname = "firestarter";
57 src = fetchFromGitHub {
58 owner = "tud-zih-energy";
61 sha256 = "1ik6j1lw5nldj4i3lllrywqg54m9i2vxkxsb2zr4q0d2rfywhn23";
62 fetchSubmodules = true;
69 ] ++ lib.optionals withCuda [
73 buildInputs = [ hwloc ] ++ (if withCuda then
74 [ glibc_multi cudatoolkit ]
78 NIX_LDFLAGS = lib.optionals withCuda [
79 "-L${cudatoolkit}/lib/stubs"
83 "-DFIRESTARTER_BUILD_HWLOC=OFF"
84 "-DCMAKE_C_COMPILER_WORKS=1"
85 "-DCMAKE_CXX_COMPILER_WORKS=1"
86 ] ++ lib.optionals withCuda [
87 "-DFIRESTARTER_BUILD_TYPE=FIRESTARTER_CUDA"
93 cp src/FIRESTARTER${lib.optionalString withCuda "_CUDA"} $out/bin/
97 postFixup = lib.optionalString withCuda ''
98 addDriverRunpath $out/bin/FIRESTARTER_CUDA
102 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
103 homepage = "https://tu-dresden.de/zih/forschung/projekte/firestarter";
104 description = "Processor Stress Test Utility";
105 platforms = platforms.linux;
106 maintainers = with maintainers; [ astro marenz ];
107 license = licenses.gpl3;
108 mainProgram = "FIRESTARTER";