peakperf: Initial CUDA support

This commit is contained in:
Erwin Boskma 2024-10-01 11:36:42 +02:00
parent cc8183cdf0
commit 871bef56c4
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk

View file

@ -1,11 +1,16 @@
{
config,
lib,
stdenv,
fetchFromGitHub,
cmake,
enableCuda ? config.cudaSupport,
cudaPackages ? { },
}:
stdenv.mkDerivation (finalAttrs: {
let
effectiveStdenv = if enableCuda then cudaPackages.backendStdenv else stdenv;
in
effectiveStdenv.mkDerivation (finalAttrs: {
pname = "peakperf";
version = "1.17";
@ -16,6 +21,12 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-bP38oo0tHDvzbWHiNwbkQoM7ZQ4nwTimVYfbPh0FUd4=";
};
buildInputs =
[ ]
++ lib.optionals enableCuda [
cudaPackages.cudart
];
nativeBuildInputs = [
cmake
];