2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, glibc, python3, cudatoolkit,
|
2019-08-07 20:48:50 +01:00
|
|
|
withCuda ? true
|
|
|
|
}:
|
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
with lib;
|
2019-08-07 20:48:50 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "firestarter";
|
2019-10-30 23:13:15 +00:00
|
|
|
version = "1.7.4";
|
2019-08-07 20:48:50 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tud-zih-energy";
|
|
|
|
repo = "FIRESTARTER";
|
|
|
|
rev = "v${version}";
|
2020-07-06 14:46:46 +01:00
|
|
|
sha256 = "0zqfqb7hf48z39g1qhbl1iraf8rz4d629h1q6ikizckpzfq23kd0";
|
2019-08-07 20:48:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ python3 ];
|
2019-10-30 23:13:15 +00:00
|
|
|
buildInputs = [ glibc.static ] ++ optionals withCuda [ cudatoolkit ];
|
2019-08-07 20:48:50 +01:00
|
|
|
preBuild = ''
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
python ../code-generator.py ${optionalString withCuda "--enable-cuda"}
|
|
|
|
'';
|
|
|
|
makeFlags = optionals withCuda [ "LINUX_CUDA_PATH=${cudatoolkit}" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp FIRESTARTER $out/bin/firestarter
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://tu-dresden.de/zih/forschung/projekte/firestarter";
|
2019-08-07 20:48:50 +01:00
|
|
|
description = "Processor Stress Test Utility";
|
|
|
|
platforms = platforms.linux;
|
2020-07-06 14:46:46 +01:00
|
|
|
maintainers = with maintainers; [ astro marenz ];
|
2019-08-07 20:48:50 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
};
|
|
|
|
}
|