From 5c7a363f9ccdcefc111aa5ad57abe478adf16e3f Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 21:21:16 +0200 Subject: [PATCH 01/10] openmpi: split outputs -> out, man --- pkgs/development/libraries/openmpi/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 937669fc5855..76216d169412 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -43,6 +43,8 @@ in stdenv.mkDerivation rec { find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \; ''; + outputs = [ "out" "man" ]; + buildInputs = [ zlib ] ++ lib.optionals stdenv.isLinux [ libnl numactl pmix ucx ] ++ lib.optionals cudaSupport [ cudatoolkit ] From 50de82b10ead480bb94454bb7b20f0108fbd7212 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 21:22:33 +0200 Subject: [PATCH 02/10] openmpi: use getDev to get includes --- pkgs/development/libraries/openmpi/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 76216d169412..1f15bfb360a7 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -58,8 +58,8 @@ in stdenv.mkDerivation rec { configureFlags = lib.optional (!cudaSupport) "--disable-mca-dso" ++ lib.optional (!fortranSupport) "--disable-mpi-fortran" ++ lib.optionals stdenv.isLinux [ - "--with-libnl=${libnl.dev}" - "--with-pmix=${pmix}" + "--with-libnl=${lib.getDev libnl}" + "--with-pmix=${lib.getDev pmix}" "--with-pmix-libdir=${pmix}/lib" "--enable-mpi-cxx" ] ++ lib.optional enableSGE "--with-sge" @@ -68,7 +68,7 @@ in stdenv.mkDerivation rec { # https://github.com/openucx/ucx # https://www.open-mpi.org/faq/?category=buildcuda ++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ] - ++ lib.optionals fabricSupport [ "--with-psm2=${libpsm2}" "--with-libfabric=${libfabric}" ] + ++ lib.optionals fabricSupport [ "--with-psm2=${lib.getDev libpsm2}" "--with-libfabric=${lib.getDev libfabric}" ] ; enableParallelBuilding = true; From a56afaa19e394aec99be2f98453b967c6d35aae2 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 21:23:22 +0200 Subject: [PATCH 03/10] openmpi: delete all libtool .la files Clear all *.la from lib to reduce the number file in output. These libtool files are not needed. --- pkgs/development/libraries/openmpi/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 1f15bfb360a7..d843e1e462f7 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -74,7 +74,7 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - rm -f $out/lib/*.la + find $out/lib/ -name "*.la" -exec rm -f \{} \; ''; postFixup = '' From 37b69dd34e6ffc5c7b13ac59fba95d8b4c367a03 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 11:09:21 +0200 Subject: [PATCH 04/10] mpich: split outputs -> out, doc, man --- pkgs/development/libraries/mpich/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix index a505dd73fa0c..622ee233f9c4 100644 --- a/pkgs/development/libraries/mpich/default.nix +++ b/pkgs/development/libraries/mpich/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-NJLpitq2K1l+8NKS+yRZthI7yABwqKoKML5pYgdaEvA="; }; + outputs = [ "out" "doc" "man" ]; + configureFlags = [ "--enable-shared" "--enable-sharedlib" From 3ba516e75bb84cc643bf45c6e81cc8f6f62b5821 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 11:09:59 +0200 Subject: [PATCH 05/10] mvapich: split outputs -> out, doc, man --- pkgs/development/libraries/mvapich/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/mvapich/default.nix b/pkgs/development/libraries/mvapich/default.nix index 987f4022f511..9c5046415e64 100644 --- a/pkgs/development/libraries/mvapich/default.nix +++ b/pkgs/development/libraries/mvapich/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-w5pEkvS+UN9hAHhXSLoolOI85FCpQSgYHVFtpXV3Ua4="; }; + outputs = [ "out" "doc" "man" ]; + nativeBuildInputs = [ pkg-config bison makeWrapper gfortran ]; propagatedBuildInputs = [ numactl rdma-core zlib opensm ]; buildInputs = with lib; [ From ff542d5f5360711d0055008c2ca88560e2a8b76e Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 11:07:35 +0200 Subject: [PATCH 06/10] libfabric: split outputs -> out, dev, man --- pkgs/development/libraries/libfabric/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libfabric/default.nix b/pkgs/development/libraries/libfabric/default.nix index 66a0b7ddbae6..ab2da122da74 100644 --- a/pkgs/development/libraries/libfabric/default.nix +++ b/pkgs/development/libraries/libfabric/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-7VOhdZOPBe1qh8OK8OTNKA5I4A5whl6aOubAzsUDSRw="; }; + outputs = [ "out" "dev" "man" ]; + nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = lib.optionals enableOpx [ libuuid numactl ] ++ lib.optionals enablePsm2 [ libpsm2 ]; From e5b27235e0c1ac60f1766e6654f717f2248df343 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 21:34:09 +0200 Subject: [PATCH 07/10] pmix: use getDev to get includes --- pkgs/development/libraries/pmix/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pmix/default.nix b/pkgs/development/libraries/pmix/default.nix index 1f16ba86b3ba..372e2655a87e 100644 --- a/pkgs/development/libraries/pmix/default.nix +++ b/pkgs/development/libraries/pmix/default.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation rec { buildInputs = [ libevent hwloc munge zlib ]; configureFlags = [ - "--with-libevent=${libevent.dev}" + "--with-libevent=${lib.getDev libevent}" "--with-munge=${munge}" - "--with-hwloc=${hwloc.dev}" + "--with-hwloc=${lib.getDev hwloc}" ]; preConfigure = '' From 47c6341abbaa6699835f5ae78c1328e8d782eac4 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 21:34:41 +0200 Subject: [PATCH 08/10] pmix: remove libtool .la files The libtool files are not needed. Clear the .la files from the output to reduce the number files. --- pkgs/development/libraries/pmix/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/pmix/default.nix b/pkgs/development/libraries/pmix/default.nix index 372e2655a87e..3f1b2e2cf368 100644 --- a/pkgs/development/libraries/pmix/default.nix +++ b/pkgs/development/libraries/pmix/default.nix @@ -32,6 +32,10 @@ stdenv.mkDerivation rec { ./autogen.pl ''; + postInstall = '' + find $out/lib/ -name "*.la" -exec rm -f \{} \; + ''; + enableParallelBuilding = true; meta = with lib; { From 71b60a7bb79b75d9a87e87a57edfecb5b07b1875 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 11:12:53 +0200 Subject: [PATCH 09/10] ucc: split outputs -> out, dev --- pkgs/development/libraries/ucc/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/ucc/default.nix b/pkgs/development/libraries/ucc/default.nix index e26e6e603f8e..a92c6bea37d7 100644 --- a/pkgs/development/libraries/ucc/default.nix +++ b/pkgs/development/libraries/ucc/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-7Mo9zU0sogGyDdWIfTgUPoR5Z8D722asC2y7sHnKbzs="; }; + outputs = [ "out" "dev" ]; + enableParallelBuilding = true; postPatch = '' @@ -42,6 +44,12 @@ stdenv.mkDerivation rec { ++ lib.optional enableAvx "--with-avx" ++ lib.optional enableCuda "--with-cuda=${cudatoolkit}"; + postInstall = '' + find $out/lib/ -name "*.la" -exec rm -f \{} \; + + moveToOutput bin/ucc_info $dev + ''; + meta = with lib; { description = "Collective communication operations API"; license = licenses.bsd3; From a0a2fe7d60dc14a13e5fa3426fd402517b64ed5e Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 8 Oct 2023 11:13:27 +0200 Subject: [PATCH 10/10] ucx: split outputs -> out, doc, dev --- pkgs/development/libraries/ucx/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/ucx/default.nix b/pkgs/development/libraries/ucx/default.nix index a6dfb9f85c80..6b4d0b76a96e 100644 --- a/pkgs/development/libraries/ucx/default.nix +++ b/pkgs/development/libraries/ucx/default.nix @@ -30,6 +30,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-VxIxrk9qKM6Ncfczl4p2EhXiLNgPaYTmjhqi6/w2ZNY="; }; + outputs = [ "out" "doc" "dev" ]; + nativeBuildInputs = [ autoreconfHook doxygen pkg-config ]; buildInputs = [ @@ -51,6 +53,14 @@ stdenv.mkDerivation rec { ] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}" ++ lib.optional enableRocm "--with-rocm=${rocm}"; + postInstall = '' + find $out/lib/ -name "*.la" -exec rm -f \{} \; + + moveToOutput bin/ucx_info $dev + + moveToOutput share/ucx/examples $doc + ''; + enableParallelBuilding = true; meta = with lib; {