From c5eaef0ab9da11533ac844c3ded3d7518ff88904 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 7 Aug 2019 21:48:50 +0200 Subject: [PATCH] firestarter: init at 1.7.3 --- .../applications/misc/firestarter/default.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/applications/misc/firestarter/default.nix diff --git a/pkgs/applications/misc/firestarter/default.nix b/pkgs/applications/misc/firestarter/default.nix new file mode 100644 index 000000000000..e93d0ab69a7b --- /dev/null +++ b/pkgs/applications/misc/firestarter/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, python3, cudatoolkit, + withCuda ? true +}: + +with stdenv.lib; +stdenv.mkDerivation rec { + pname = "firestarter"; + version = "1.7.3"; + + src = fetchFromGitHub { + owner = "tud-zih-energy"; + repo = "FIRESTARTER"; + rev = "v${version}"; + sha256 = "1gc7kmzx9nw22lyfmpyz72p974jf1hvw5nvszcaq7x6h8cz9ip15"; + }; + + nativeBuildInputs = [ python3 ]; + buildInputs = 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd2f71c28ae2..2143fcf50061 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1581,6 +1581,8 @@ in firecracker = callPackage ../applications/virtualization/firecracker { }; + firestarter = callPackage ../applications/misc/firestarter { }; + fsmon = callPackage ../tools/misc/fsmon { }; fsql = callPackage ../tools/misc/fsql { };