Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx
2, enableCuda ? false
3, cudatoolkit
4, enableAvx ? stdenv.hostPlatform.avxSupport
5, enableSse41 ? stdenv.hostPlatform.sse4_1Support
6, enableSse42 ? stdenv.hostPlatform.sse4_2Support
7} :
8
9stdenv.mkDerivation rec {
10 pname = "ucc";
11 version = "1.1.0";
12
13 src = fetchFromGitHub {
14 owner = "openucx";
15 repo = "ucc";
16 rev = "v${version}";
17 sha256 = "sha256-5rf08SXy+vCfnz4zLJ0cMnxwso4WpZOt0jRRAUviVFU=";
18 };
19
20 enableParallelBuilding = true;
21
22 postPatch = ''
23
24 for comp in $(find src/components -name Makefile.am); do
25 substituteInPlace $comp \
26 --replace "/bin/bash" "${stdenv.shell}"
27 done
28 '';
29
30 preConfigure = ''
31 ./autogen.sh
32 '';
33
34 nativeBuildInputs = [ libtool automake autoconf ];
35 buildInputs = [ ucx ]
36 ++ lib.optional enableCuda cudatoolkit;
37
38 configureFlags = [ ]
39 ++ lib.optional enableSse41 "--with-sse41"
40 ++ lib.optional enableSse42 "--with-sse42"
41 ++ lib.optional enableAvx "--with-avx"
42 ++ lib.optional enableCuda "--with-cuda=${cudatoolkit}";
43
44 meta = with lib; {
45 description = "Collective communication operations API";
46 license = licenses.bsd3;
47 maintainers = [ maintainers.markuskowa ];
48 platforms = platforms.linux;
49 };
50}