2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen
|
2021-12-06 16:07:01 +00:00
|
|
|
, numactl, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin
|
|
|
|
, enableCuda ? false
|
|
|
|
, cudatoolkit
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
let
|
|
|
|
# Needed for configure to find all libraries
|
|
|
|
cudatoolkit' = symlinkJoin {
|
|
|
|
inherit (cudatoolkit) name meta;
|
|
|
|
paths = [ cudatoolkit cudatoolkit.lib ];
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "ucx";
|
2022-01-22 01:22:15 +00:00
|
|
|
version = "1.12.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openucx";
|
|
|
|
repo = "ucx";
|
|
|
|
rev = "v${version}";
|
2022-01-22 01:22:15 +00:00
|
|
|
sha256 = "0jwza9ivfnhkfwg4c58pxalkga5scz803k631xw4hcliy62gk53w";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook doxygen ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [
|
|
|
|
libbfd
|
|
|
|
libiberty
|
|
|
|
numactl
|
|
|
|
perl
|
|
|
|
rdma-core
|
|
|
|
zlib
|
|
|
|
] ++ lib.optional enableCuda cudatoolkit;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-rdmacm=${rdma-core}"
|
|
|
|
"--with-dc"
|
|
|
|
"--with-rc"
|
|
|
|
"--with-dm"
|
|
|
|
"--with-verbs=${rdma-core}"
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Unified Communication X library";
|
|
|
|
homepage = "http://www.openucx.org";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.markuskowa ];
|
|
|
|
};
|
|
|
|
}
|