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>

authored by

Enno Richter
Sandro
and committed by
GitHub
dda4132d a054f496

+47
+45
pkgs/applications/misc/gpu-burn/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub, addOpenGLRunpath, cudatoolkit }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "gpu-burn"; 5 + version = "unstable-2021-04-29"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "wilicc"; 9 + repo = "gpu-burn"; 10 + rev = "1e9a84f4bec3b0835c00daace45d79ed6c488edb"; 11 + sha256 = "sha256-x+kta81Z08PsBgbf+fzRTXhNXUPBd5w8bST/T5nNiQA="; 12 + }; 13 + 14 + postPatch = '' 15 + substituteInPlace gpu_burn-drv.cpp \ 16 + --replace "const char *kernelFile = \"compare.ptx\";" \ 17 + "const char *kernelFile = \"$out/share/compare.ptx\";" 18 + ''; 19 + 20 + buildInputs = [ cudatoolkit ]; 21 + 22 + nativeBuildInputs = [ addOpenGLRunpath ]; 23 + 24 + makeFlags = [ "CUDAPATH=${cudatoolkit}" ]; 25 + 26 + LDFLAGS = "-L${cudatoolkit}/lib/stubs"; 27 + 28 + installPhase = '' 29 + mkdir -p $out/{bin,share} 30 + cp gpu_burn $out/bin/ 31 + cp compare.ptx $out/share/ 32 + ''; 33 + 34 + postFixup = '' 35 + addOpenGLRunpath $out/bin/gpu_burn 36 + ''; 37 + 38 + meta = with lib; { 39 + homepage = "http://wili.cc/blog/gpu-burn.html"; 40 + description = "Multi-GPU CUDA stress test"; 41 + platforms = platforms.linux; 42 + maintainers = with maintainers; [ elohmeier ]; 43 + license = licenses.bsd2; 44 + }; 45 + }
+2
pkgs/top-level/all-packages.nix
··· 2851 2851 2852 2852 gping = callPackage ../tools/networking/gping { }; 2853 2853 2854 + gpu-burn = callPackage ../applications/misc/gpu-burn { }; 2855 + 2854 2856 greg = callPackage ../applications/audio/greg { 2855 2857 pythonPackages = python3Packages; 2856 2858 };