1 { lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen, numactl
2 , rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
4 , enableCuda ? config.cudaSupport
6 , enableRocm ? config.rocmSupport
11 # Needed for configure to find all libraries
12 cudatoolkit' = symlinkJoin {
13 inherit (cudatoolkit) name meta;
14 paths = [ cudatoolkit cudatoolkit.lib ];
17 rocmList = with rocmPackages; [ rocm-core rocm-runtime rocm-device-libs clr ];
25 stdenv.mkDerivation rec {
29 src = fetchFromGitHub {
33 sha256 = "sha256-VxIxrk9qKM6Ncfczl4p2EhXiLNgPaYTmjhqi6/w2ZNY=";
36 outputs = [ "out" "doc" "dev" ];
38 nativeBuildInputs = [ autoreconfHook doxygen pkg-config ];
47 ] ++ lib.optional enableCuda cudatoolkit
48 ++ lib.optionals enableRocm rocmList;
51 "--with-rdmacm=${lib.getDev rdma-core}"
55 "--with-verbs=${lib.getDev rdma-core}"
56 ] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}"
57 ++ lib.optional enableRocm "--with-rocm=${rocm}";
60 find $out/lib/ -name "*.la" -exec rm -f \{} \;
62 moveToOutput bin/ucx_info $dev
64 moveToOutput share/ucx/examples $doc
67 enableParallelBuilding = true;
70 description = "Unified Communication X library";
71 homepage = "https://www.openucx.org";
72 license = licenses.bsd3;
73 platforms = platforms.linux;
74 maintainers = [ maintainers.markuskowa ];