pmix: use substituteInPlace in cross-compilation fix

This ensures that this doesn't fail if the sed pattern all of a sudden
is incorrect
This commit is contained in:
Doron Behar
2024-08-06 19:53:59 +03:00
parent 716fcced47
commit e4900a8029
+3 -2
View File
@@ -71,8 +71,9 @@ stdenv.mkDerivation rec {
# Pin the compiler to the current version in a cross compiler friendly way.
# Same pattern as for openmpi (see https://github.com/NixOS/nixpkgs/pull/58964#discussion_r275059427).
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
$dev/share/pmix/pmixcc-wrapper-data.txt
substituteInPlace $dev/share/pmix/pmixcc-wrapper-data.txt \
--replace-fail compiler=gcc \
compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc
'';
enableParallelBuilding = true;