From 7c189828223f55f7fc07a01bc6d860e44918f690 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 8 Aug 2024 07:28:04 +0300 Subject: [PATCH] pmix: put substitution & wrapping in install & fixup respectively Make it match the same pattern as in openmpi. --- pkgs/development/libraries/pmix/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/pmix/default.nix b/pkgs/development/libraries/pmix/default.nix index 95ef2610841a..2f4a616f76e3 100644 --- a/pkgs/development/libraries/pmix/default.nix +++ b/pkgs/development/libraries/pmix/default.nix @@ -80,11 +80,11 @@ stdenv.mkDerivation (finalAttrs: { moveToOutput "bin/pmixcc" "''${!outputDev}" moveToOutput "share/pmix/pmixcc-wrapper-data.txt" "''${!outputDev}" - # The path to the pmixcc-wrapper-data.txt is hard coded and - # points to $out instead of dev. Use wrapper to fix paths. - wrapProgram "''${!outputDev}"/bin/pmixcc \ - --set PMIX_INCLUDEDIR "''${!outputDev}"/include \ - --set PMIX_PKGDATADIR "''${!outputDev}"/share/pmix + # 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). + substituteInPlace "''${!outputDev}"/share/pmix/pmixcc-wrapper-data.txt \ + --replace-fail compiler=gcc \ + compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc ''; postFixup = '' @@ -92,11 +92,11 @@ stdenv.mkDerivation (finalAttrs: { # into the library. This clears all references to $dev/include. remove-references-to -t "''${!outputDev}" $(readlink -f $out/lib/libpmix.so) - # 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). - substituteInPlace "''${!outputDev}"/share/pmix/pmixcc-wrapper-data.txt \ - --replace-fail compiler=gcc \ - compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc + # The path to the pmixcc-wrapper-data.txt is hard coded and + # points to $out instead of dev. Use wrapper to fix paths. + wrapProgram "''${!outputDev}"/bin/pmixcc \ + --set PMIX_INCLUDEDIR "''${!outputDev}"/include \ + --set PMIX_PKGDATADIR "''${!outputDev}"/share/pmix ''; enableParallelBuilding = true;