3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/firestarter/default.nix

40 lines
1 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}";
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
'';
meta = with stdenv.lib; {
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;
};
}