openmpi: fix postInstall hook on Darwin

This commit is contained in:
Doron Behar 2024-08-07 18:57:20 +03:00
parent af0df905e6
commit 8db6dc53b0

View File

@ -212,7 +212,12 @@ stdenv.mkDerivation (finalAttrs: {
${lib.pipe wrapperDataFileNames [
(lib.mapCartesianProduct (
{ part1, part2 }:
''
# From some reason the Darwin build doesn't include some of these
# wrapperDataSubstitutions strings and even some of the files. Hence
# we currently don't perform these substitutions on other platforms,
# until a Darwin user will care enough about this cross platform
# related substitution.
lib.optionalString stdenv.isLinux ''
substituteInPlace "''${!outputDev}/share/openmpi/${part1}${part2}-wrapper-data.txt" \
--replace-fail \
compiler=${lib.elemAt wrapperDataSubstitutions.${part2} 0} \