nixpkgs/pkgs/by-name/uc/ucx/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

115 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
doxygen,
numactl,
rdma-core,
libbfd,
libiberty,
perl,
zlib,
symlinkJoin,
pkg-config,
config,
autoAddDriverRunpath,
enableCuda ? config.cudaSupport,
cudaPackages,
enableRocm ? config.rocmSupport,
rocmPackages,
}:
let
rocmList = with rocmPackages; [
rocm-core
rocm-runtime
rocm-device-libs
clr
];
rocm = symlinkJoin {
name = "rocm";
paths = rocmList;
};
in
stdenv.mkDerivation rec {
pname = "ucx";
version = "1.17.0";
src = fetchFromGitHub {
owner = "openucx";
repo = "ucx";
rev = "v${version}";
sha256 = "sha256-Qd3c51LeF04haZA4wK6loNZwX2a3ju+ljwdPYPoUKCQ=";
};
outputs = [
"out"
"doc"
"dev"
];
nativeBuildInputs =
[
autoreconfHook
doxygen
pkg-config
]
++ lib.optionals enableCuda [
cudaPackages.cuda_nvcc
autoAddDriverRunpath
];
buildInputs =
[
libbfd
libiberty
numactl
perl
rdma-core
zlib
]
++ lib.optionals enableCuda [
cudaPackages.cuda_cudart
cudaPackages.cuda_nvml_dev
]
++ lib.optionals enableRocm rocmList;
LDFLAGS = lib.optionals enableCuda [
# Fake libnvidia-ml.so (the real one is deployed impurely)
"-L${lib.getLib cudaPackages.cuda_nvml_dev}/lib/stubs"
];
configureFlags =
[
"--with-rdmacm=${lib.getDev rdma-core}"
"--with-dc"
"--with-rc"
"--with-dm"
"--with-verbs=${lib.getDev rdma-core}"
]
++ lib.optionals enableCuda [ "--with-cuda=${cudaPackages.cuda_cudart}" ]
++ 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; {
description = "Unified Communication X library";
homepage = "https://www.openucx.org";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = [ maintainers.markuskowa ];
};
}