diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
commit | a5e1520e4538e29ecfbd4b168306f890566d7bfd (patch) | |
tree | 28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/development/libraries/pmix | |
parent | 822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff) | |
parent | 3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff) | |
download | nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2 nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/pmix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/pmix/default.nix | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/pmix/default.nix b/nixpkgs/pkgs/development/libraries/pmix/default.nix index f5fb65f7989b..78605179f710 100644 --- a/nixpkgs/pkgs/development/libraries/pmix/default.nix +++ b/nixpkgs/pkgs/development/libraries/pmix/default.nix @@ -1,5 +1,7 @@ { lib, stdenv, fetchFromGitHub, perl, autoconf, automake -, libtool, python3, flex, libevent, hwloc, munge, zlib, pandoc, gitMinimal +, removeReferencesTo, libtool, python3, flex, libevent +, targetPackages, makeWrapper +, hwloc, munge, zlib, pandoc, gitMinimal } : stdenv.mkDerivation rec { @@ -14,6 +16,8 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + outputs = [ "out" "dev" ]; + postPatch = '' patchShebangs ./autogen.pl patchShebangs ./config @@ -28,6 +32,8 @@ stdenv.mkDerivation rec { flex gitMinimal python3 + removeReferencesTo + makeWrapper ]; buildInputs = [ libevent hwloc munge zlib ]; @@ -46,6 +52,27 @@ stdenv.mkDerivation rec { postInstall = '' find $out/lib/ -name "*.la" -exec rm -f \{} \; + + moveToOutput "bin/pmix_info" "''${!outputDev}" + 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 $dev/bin/pmixcc \ + --set PMIX_INCLUDEDIR $dev/include \ + --set PMIX_PKGDATADIR $dev/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) + + # 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 ''; enableParallelBuilding = true; |