nixpkgs/pkgs/by-name/um/umpire/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

2024-01-30 09:43:43 +00:00
{ stdenv
, lib
, fetchFromGitHub
, cmake
2024-08-30 11:37:35 +00:00
, config
, cudaSupport ? config.cudaSupport
, cudaPackages ? null
2024-01-30 09:43:43 +00:00
}:
2024-08-30 11:37:35 +00:00
assert cudaSupport -> cudaPackages != null;
2024-01-30 09:43:43 +00:00
stdenv.mkDerivation rec {
pname = "umpire";
2024-07-25 02:56:53 +00:00
version = "2024.07.0";
2024-01-30 09:43:43 +00:00
src = fetchFromGitHub {
owner = "LLNL";
repo = "umpire";
rev = "v${version}";
2024-08-06 11:36:03 +00:00
hash = "sha256-JbYaJe4bqlB272aZxB3Amw8fX/pmZr/4/7kaukAiK8c=";
2024-01-30 09:43:43 +00:00
fetchSubmodules = true;
};
2024-08-30 11:37:35 +00:00
nativeBuildInputs = [
cmake
] ++ lib.optionals cudaSupport [
cudaPackages.cuda_nvcc
];
buildInputs = lib.optionals cudaSupport (with cudaPackages; [
cudatoolkit
cuda_cudart
]);
cmakeFlags = lib.optionals cudaSupport [
"-DCUDA_TOOLKIT_ROOT_DIR=${cudaPackages.cudatoolkit}"
"-DENABLE_CUDA=ON"
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
];
2024-01-30 09:43:43 +00:00
meta = with lib; {
description = "Application-focused API for memory management on NUMA & GPU architectures";
homepage = "https://github.com/LLNL/Umpire";
maintainers = with maintainers; [ sheepforce ];
license = with licenses; [ mit ];
platforms = [ "x86_64-linux" ];
};
}