summary refs log tree commit diff
path: root/pkgs/applications/misc/firestarter
diff options
context:
space:
mode:
authorAstro <astro@spaceboyz.net>2019-08-07 21:48:50 +0200
committerAstro <astro@spaceboyz.net>2019-08-10 20:36:29 +0200
commitc5eaef0ab9da11533ac844c3ded3d7518ff88904 (patch)
tree49bcc8548d0ae249db9f941d69cad11866c09f29 /pkgs/applications/misc/firestarter
parent809b38a784ea413b36d188688eb1d2318e6438da (diff)
downloadnixpkgs-c5eaef0ab9da11533ac844c3ded3d7518ff88904.tar
nixpkgs-c5eaef0ab9da11533ac844c3ded3d7518ff88904.tar.gz
nixpkgs-c5eaef0ab9da11533ac844c3ded3d7518ff88904.tar.bz2
nixpkgs-c5eaef0ab9da11533ac844c3ded3d7518ff88904.tar.lz
nixpkgs-c5eaef0ab9da11533ac844c3ded3d7518ff88904.tar.xz
nixpkgs-c5eaef0ab9da11533ac844c3ded3d7518ff88904.tar.zst
nixpkgs-c5eaef0ab9da11533ac844c3ded3d7518ff88904.zip
firestarter: init at 1.7.3
Diffstat (limited to 'pkgs/applications/misc/firestarter')
-rw-r--r--pkgs/applications/misc/firestarter/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/applications/misc/firestarter/default.nix b/pkgs/applications/misc/firestarter/default.nix
new file mode 100644
index 00000000000..e93d0ab69a7
--- /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;
+  };
+}