From 97a89f6d197f233115831ea1fe08894ffd55c8d9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 8 Aug 2024 07:23:47 +0300 Subject: [PATCH] pmix: use "''${!outputDev}" instead of $dev This allows disabling multiple outputs more easily, as the first will evaluate to $out if a "dev" output is not enabled. --- pkgs/development/libraries/pmix/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/pmix/default.nix b/pkgs/development/libraries/pmix/default.nix index 0f51b96d5609..95ef2610841a 100644 --- a/pkgs/development/libraries/pmix/default.nix +++ b/pkgs/development/libraries/pmix/default.nix @@ -82,19 +82,19 @@ stdenv.mkDerivation (finalAttrs: { # The path to the pmixcc-wrapper-data.txt is hard coded and # points to $out instead of dev. Use wrapper to fix paths. - wrapProgram $dev/bin/pmixcc \ - --set PMIX_INCLUDEDIR $dev/include \ - --set PMIX_PKGDATADIR $dev/share/pmix + wrapProgram "''${!outputDev}"/bin/pmixcc \ + --set PMIX_INCLUDEDIR "''${!outputDev}"/include \ + --set PMIX_PKGDATADIR "''${!outputDev}"/share/pmix ''; postFixup = '' # The build info (parameters to ./configure) are hardcoded # into the library. This clears all references to $dev/include. - remove-references-to -t $dev $(readlink -f $out/lib/libpmix.so) + 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 $dev/share/pmix/pmixcc-wrapper-data.txt \ + substituteInPlace "''${!outputDev}"/share/pmix/pmixcc-wrapper-data.txt \ --replace-fail compiler=gcc \ compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc '';