scalapack: fix generated cmake files

cmake files pointed to libscalpack.so in $dev output instead of $out.
This commit is contained in:
Markus Kowalewski 2024-03-29 13:38:14 +01:00
parent 2483c2d61a
commit 46149042db

View File

@ -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";