mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 09:34:36 +00:00
Merge pull request #282034 from markuskowa/fix-closure-pmix
pmix: split outputs to out and dev
This commit is contained in:
commit
407a0285c9
@ -36,14 +36,16 @@ stdenv.mkDerivation rec {
|
|||||||
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
||||||
"FCFLAGS=-fallow-argument-mismatch"
|
"FCFLAGS=-fallow-argument-mismatch"
|
||||||
] ++ lib.optionals pmixSupport [
|
] ++ lib.optionals pmixSupport [
|
||||||
"--with-pmix=${lib.getDev pmix}"
|
"--with-pmix"
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ gfortran python3 ];
|
nativeBuildInputs = [ gfortran python3 ];
|
||||||
buildInputs = [ perl openssh hwloc ]
|
buildInputs = [ perl openssh hwloc ]
|
||||||
++ lib.optional (!stdenv.isDarwin) ch4backend;
|
++ lib.optional (!stdenv.isDarwin) ch4backend
|
||||||
|
++ lib.optional pmixSupport pmix;
|
||||||
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, perl, autoconf, automake
|
{ 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 {
|
stdenv.mkDerivation rec {
|
||||||
@ -14,6 +16,8 @@ stdenv.mkDerivation rec {
|
|||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs ./autogen.pl
|
patchShebangs ./autogen.pl
|
||||||
patchShebangs ./config
|
patchShebangs ./config
|
||||||
@ -28,6 +32,8 @@ stdenv.mkDerivation rec {
|
|||||||
flex
|
flex
|
||||||
gitMinimal
|
gitMinimal
|
||||||
python3
|
python3
|
||||||
|
removeReferencesTo
|
||||||
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ libevent hwloc munge zlib ];
|
buildInputs = [ libevent hwloc munge zlib ];
|
||||||
@ -46,6 +52,27 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
find $out/lib/ -name "*.la" -exec rm -f \{} \;
|
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;
|
enableParallelBuilding = true;
|
||||||
|
@ -37,6 +37,13 @@ stdenv.mkDerivation rec {
|
|||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace src/common/env.c \
|
substituteInPlace src/common/env.c \
|
||||||
--replace "/bin/echo" "${coreutils}/bin/echo"
|
--replace "/bin/echo" "${coreutils}/bin/echo"
|
||||||
|
|
||||||
|
# Autoconf does not support split packages for pmix (libs and headers).
|
||||||
|
# Fix the path to the pmix libraries, so dlopen can find it.
|
||||||
|
substituteInPlace src/plugins/mpi/pmix/mpi_pmix.c \
|
||||||
|
--replace 'xstrfmtcat(full_path, "%s/", PMIXP_LIBPATH)' \
|
||||||
|
'xstrfmtcat(full_path, "${lib.getLib pmix}/lib/")'
|
||||||
|
|
||||||
'' + (lib.optionalString enableX11 ''
|
'' + (lib.optionalString enableX11 ''
|
||||||
substituteInPlace src/common/x11_util.c \
|
substituteInPlace src/common/x11_util.c \
|
||||||
--replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"'
|
--replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"'
|
||||||
@ -68,7 +75,7 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-yaml=${lib.getDev libyaml}"
|
"--with-yaml=${lib.getDev libyaml}"
|
||||||
"--with-ofed=${lib.getDev rdma-core}"
|
"--with-ofed=${lib.getDev rdma-core}"
|
||||||
"--sysconfdir=/etc/slurm"
|
"--sysconfdir=/etc/slurm"
|
||||||
"--with-pmix=${pmix}"
|
"--with-pmix=${lib.getDev pmix}"
|
||||||
"--with-bpf=${libbpf}"
|
"--with-bpf=${libbpf}"
|
||||||
"--without-rpath" # Required for configure to pick up the right dlopen path
|
"--without-rpath" # Required for configure to pick up the right dlopen path
|
||||||
] ++ (optional enableGtk2 "--disable-gtktest")
|
] ++ (optional enableGtk2 "--disable-gtktest")
|
||||||
|
Loading…
Reference in New Issue
Block a user