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