about summary refs log tree commit diff
path: root/pkgs/by-name/sp/spla/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/sp/spla/package.nix')
-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 210fb04af9b80..98222aa7c1f58 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 ];
   };
 }