diff options
author | Enno Richter <enno@nerdworks.de> | 2021-07-23 18:00:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-23 18:00:36 +0200 |
commit | dda4132d11f4ed73220fb4f30ac57db475862db2 (patch) | |
tree | 6a1db8e73c6752fc2604675262d8ffce4a1817ba /pkgs/applications | |
parent | a054f4960cdc9ec0aff0e47d1cd87b7f7c0a95c2 (diff) | |
download | nixpkgs-dda4132d11f4ed73220fb4f30ac57db475862db2.tar nixpkgs-dda4132d11f4ed73220fb4f30ac57db475862db2.tar.gz nixpkgs-dda4132d11f4ed73220fb4f30ac57db475862db2.tar.bz2 nixpkgs-dda4132d11f4ed73220fb4f30ac57db475862db2.tar.lz nixpkgs-dda4132d11f4ed73220fb4f30ac57db475862db2.tar.xz nixpkgs-dda4132d11f4ed73220fb4f30ac57db475862db2.tar.zst nixpkgs-dda4132d11f4ed73220fb4f30ac57db475862db2.zip |
gpu-burn: init at 2021-04-29 (#130159)
* gpu-burn: init at 2021-04-29 * Apply suggestions from code review * Update pkgs/applications/misc/gpu-burn/default.nix Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/misc/gpu-burn/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/applications/misc/gpu-burn/default.nix b/pkgs/applications/misc/gpu-burn/default.nix new file mode 100644 index 00000000000..ad11b734762 --- /dev/null +++ b/pkgs/applications/misc/gpu-burn/default.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, fetchFromGitHub, addOpenGLRunpath, cudatoolkit }: + +stdenv.mkDerivation rec { + pname = "gpu-burn"; + version = "unstable-2021-04-29"; + + src = fetchFromGitHub { + owner = "wilicc"; + repo = "gpu-burn"; + rev = "1e9a84f4bec3b0835c00daace45d79ed6c488edb"; + sha256 = "sha256-x+kta81Z08PsBgbf+fzRTXhNXUPBd5w8bST/T5nNiQA="; + }; + + postPatch = '' + substituteInPlace gpu_burn-drv.cpp \ + --replace "const char *kernelFile = \"compare.ptx\";" \ + "const char *kernelFile = \"$out/share/compare.ptx\";" + ''; + + buildInputs = [ cudatoolkit ]; + + nativeBuildInputs = [ addOpenGLRunpath ]; + + makeFlags = [ "CUDAPATH=${cudatoolkit}" ]; + + LDFLAGS = "-L${cudatoolkit}/lib/stubs"; + + installPhase = '' + mkdir -p $out/{bin,share} + cp gpu_burn $out/bin/ + cp compare.ptx $out/share/ + ''; + + postFixup = '' + addOpenGLRunpath $out/bin/gpu_burn + ''; + + meta = with lib; { + homepage = "http://wili.cc/blog/gpu-burn.html"; + description = "Multi-GPU CUDA stress test"; + platforms = platforms.linux; + maintainers = with maintainers; [ elohmeier ]; + license = licenses.bsd2; + }; +} |