mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-28 02:40:50 +00:00
zfp: remove cudatoolkit, modernize (#551647)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{
|
||||
cmake,
|
||||
cudatoolkit,
|
||||
fetchFromGitHub,
|
||||
gfortran,
|
||||
lib,
|
||||
@@ -17,6 +16,7 @@
|
||||
enableOpenMP ? true,
|
||||
enablePython ? true,
|
||||
enableUtilities ? true,
|
||||
versionCheckHook,
|
||||
}@inputs:
|
||||
|
||||
let
|
||||
@@ -29,6 +29,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
version = "1.0.1";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LLNL";
|
||||
@@ -43,19 +44,21 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
./python312.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
]
|
||||
++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ]
|
||||
++ lib.optionals enableFortran [ gfortran ]
|
||||
++ lib.optionals enablePython (
|
||||
with python3Packages;
|
||||
[
|
||||
cython
|
||||
numpy
|
||||
python
|
||||
]
|
||||
);
|
||||
|
||||
buildInputs =
|
||||
lib.optionals enableCuda [ cudatoolkit ]
|
||||
++ lib.optionals enableFortran [ gfortran ]
|
||||
++ lib.optionals enablePython (
|
||||
with python3Packages;
|
||||
[
|
||||
cython
|
||||
numpy
|
||||
python
|
||||
]
|
||||
);
|
||||
buildInputs = lib.optionals enableCuda [ cudaPackages.cuda_cudart ];
|
||||
|
||||
propagatedBuildInputs = lib.optionals (enableOpenMP && effectiveStdenv.cc.isClang) [
|
||||
llvmPackages.openmp
|
||||
@@ -96,6 +99,9 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
"ARGS=\"--exclude-regex testzfp\""
|
||||
];
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.tests = {
|
||||
cmake-config = testers.hasCmakeConfigModules {
|
||||
moduleNames = [ "zfp" ];
|
||||
|
||||
Reference in New Issue
Block a user