nixpkgs/pkgs/applications/misc/firestarter/default.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

2019-10-30 23:13:15 +00:00
{ stdenv, fetchFromGitHub, glibc, python3, cudatoolkit,
2019-08-07 20:48:50 +01:00
withCuda ? true
}:
with stdenv.lib;
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}";
2019-10-30 23:13:15 +00:00
sha256 = "161mg0h1hvp6bxfjdhyfqrljvphys896mfd36254rbgzxm38ibi7";
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
'';
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;
};
}