Files
nixpkgs/pkgs/by-name/uc/ucx/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

114 lines
2.1 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 (finalAttrs: {
pname = "ucx";
version = "1.19.0";
src = fetchFromGitHub {
owner = "openucx";
repo = "ucx";
rev = "v${finalAttrs.version}";
sha256 = "sha256-n3xJmbvUXZzfhotOBJRyH2OEL4NFZIKyB808HwEQSYo=";
};
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 = {
description = "Unified Communication X library";
homepage = "https://www.openucx.org";
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
# LoongArch64 is not supported.
# See: https://github.com/openucx/ucx/issues/9873
badPlatforms = lib.platforms.loongarch64;
maintainers = with lib.maintainers; [ markuskowa ];
};
})