about summary refs log tree commit diff
path: root/pkgs/by-name/sp/spla
diff options
context:
space:
mode:
authorMarkus Kowalewski2024-05-16 11:03:18 +0200
committerMarkus Kowalewski2024-05-16 11:28:31 +0200
commitaf6e7759a5043ff01032f28fb5f0feb50d90c742 (patch)
tree65f245be69a5992a2285e099e2d4e44a8a6faddc /pkgs/by-name/sp/spla
parentecd2c2a61eddd31c19c4369591146b91129afb5a (diff)
spla: split outputs (out,dev); do not use propagatedBuildInputs
Diffstat (limited to 'pkgs/by-name/sp/spla')
-rw-r--r--pkgs/by-name/sp/spla/package.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/by-name/sp/spla/package.nix b/pkgs/by-name/sp/spla/package.nix
index 210fb04af9b8..98222aa7c1f5 100644
--- a/pkgs/by-name/sp/spla/package.nix
+++ b/pkgs/by-name/sp/spla/package.nix
@@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
     hash = "sha256-71QpwTsRogH+6Bik9DKwezl9SqwoLxQt4SZ7zw5X6DE=";
   };
 
+  outputs = [ "out" "dev" ];
+
   postPatch = ''
     substituteInPlace src/gpu_util/gpu_blas_api.hpp \
       --replace '#include <rocblas.h>' '#include <rocblas/rocblas.h>'
@@ -43,6 +45,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     blas
+    mpi
   ]
   ++ lib.optional (gpuBackend == "cuda") cudaPackages.cudatoolkit
   ++ lib.optionals (gpuBackend == "rocm") [
@@ -51,8 +54,6 @@ stdenv.mkDerivation rec {
   ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp
   ;
 
-  propagatedBuildInputs = [ mpi ];
-
   cmakeFlags = [
     "-DSPLA_OMP=ON"
     "-DSPLA_FORTRAN=ON"
@@ -65,10 +66,15 @@ stdenv.mkDerivation rec {
   ++ lib.optional (gpuBackend == "rocm") [ "-DSPLA_GPU_BACKEND=ROCM" ]
   ;
 
+  preFixup = ''
+    substituteInPlace $out/lib/cmake/SPLA/SPLASharedTargets-release.cmake \
+      --replace-fail "\''${_IMPORT_PREFIX}" "$out"
+  '';
+
   meta = with lib; {
     description = "Specialized Parallel Linear Algebra, providing distributed GEMM functionality for specific matrix distributions with optional GPU acceleration";
     homepage = "https://github.com/eth-cscs/spla";
     license = licenses.bsd3;
-    maintainers = [ maintainers.sheepforce ];#
+    maintainers = [ maintainers.sheepforce ];
   };
 }