about summary refs log tree commit diff
path: root/pkgs/development/libraries/science/math
diff options
context:
space:
mode:
authorMarkus Kowalewski <markus.kowalewski@gmail.com>2024-03-29 13:38:14 +0100
committerMarkus Kowalewski <markus.kowalewski@gmail.com>2024-03-29 16:51:43 +0100
commit46149042db61bbc8f5c9592b46816e3404654a98 (patch)
tree36d6d8be8913534dca36f5587419deae55a40a20 /pkgs/development/libraries/science/math
parent2483c2d61a53cc55fd9a3285c03cf472bf64e003 (diff)
scalapack: fix generated cmake files
cmake files pointed to libscalpack.so in $dev output instead of $out.
Diffstat (limited to 'pkgs/development/libraries/science/math')
-rw-r--r--pkgs/development/libraries/science/math/scalapack/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/libraries/science/math/scalapack/default.nix b/pkgs/development/libraries/science/math/scalapack/default.nix
index 85aa5c4a8736a..2f8d3dbe15de3 100644
--- a/pkgs/development/libraries/science/math/scalapack/default.nix
+++ b/pkgs/development/libraries/science/math/scalapack/default.nix
@@ -63,6 +63,14 @@ stdenv.mkDerivation rec {
   # sometimes fail due to this
   checkFlagsArray = [ "ARGS=--timeout 10000" ];
 
+  postFixup = ''
+    # _IMPORT_PREFIX, used to point to lib, points to dev output. Every package using the generated
+    # cmake file will thus look for the library in the dev output instead of out.
+    # Use the absolute path to $out instead to fix the issue.
+    substituteInPlace  $dev/lib/cmake/scalapack-${version}/scalapack-targets-release.cmake \
+      --replace "\''${_IMPORT_PREFIX}" "$out"
+  '';
+
   meta = with lib; {
     homepage = "http://www.netlib.org/scalapack/";
     description = "Library of high-performance linear algebra routines for parallel distributed memory machines";