Skip to content

Commit

Permalink
peakperf: init at 1.17-unstable-2024-10-07 (#366989)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Dec 29, 2024
2 parents ae41584 + 33b7174 commit c27edad
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions pkgs/by-name/pe/peakperf/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
config,
enableCuda ? config.cudaSupport,
cudaPackages,
versionCheckHook,
installShellFiles,
unstableGitUpdater,
fetchpatch,
autoAddDriverRunpath,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "peakperf";
version = "1.17-unstable-2024-10-07";

src = fetchFromGitHub {
owner = "Dr-Noob";
repo = "peakperf";
rev = "289c8a2f58eb51712d346d5c993b3c1d136bf031";
hash = "sha256-CoGWj+zskcv8caFjhy55GKTKqFq2y1/nMjiVc6TzU1c=";
};

nativeBuildInputs =
[
cmake
installShellFiles
]
++ lib.optionals enableCuda [
cudaPackages.cuda_nvcc
autoAddDriverRunpath
];

buildInputs = lib.optionals enableCuda [
cudaPackages.cuda_cudart
cudaPackages.cuda_nvml_dev
];

postInstall = ''
installManPage ${finalAttrs.src}/peakperf.1
'';

passthru = {
updateScript = unstableGitUpdater { };
};

nativeInstallCheckInputs = [
versionCheckHook
];

versionCheckProgramArg = [
"-v"
];

preVersionCheck = ''
export version=1.17
'';

doInstallCheck = true;

versionCheckProgram = "${placeholder "out"}/bin/peakperf";

meta = {
homepage = "https://github.com/Dr-Noob/peakperf";
description = "Achieve peak performance on x86 CPUs and NVIDIA GPUs";
mainProgram = "peakperf";
maintainers = with lib.maintainers; [ bot-wxt1221 ];
platforms = [ "x86_64-linux" ];
license = lib.licenses.gpl2Only;
};
})

0 comments on commit c27edad

Please sign in to comment.