mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 05:31:22 +00:00
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ stdenv, fetchFromGitHub, glibc, python3, cudatoolkit,
|
|
withCuda ? true
|
|
}:
|
|
|
|
with stdenv.lib;
|
|
stdenv.mkDerivation rec {
|
|
pname = "firestarter";
|
|
version = "1.7.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tud-zih-energy";
|
|
repo = "FIRESTARTER";
|
|
rev = "v${version}";
|
|
sha256 = "161mg0h1hvp6bxfjdhyfqrljvphys896mfd36254rbgzxm38ibi7";
|
|
};
|
|
|
|
nativeBuildInputs = [ python3 ];
|
|
buildInputs = [ glibc.static ] ++ optionals withCuda [ cudatoolkit ];
|
|
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
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = "https://tu-dresden.de/zih/forschung/projekte/firestarter";
|
|
description = "Processor Stress Test Utility";
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ astro ];
|
|
license = licenses.gpl3;
|
|
};
|
|
}
|