2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, autoreconfHook
|
2024-09-26 11:04:55 +00:00
|
|
|
, enablePsm2 ? (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux)
|
2023-01-20 10:41:00 +00:00
|
|
|
, libpsm2
|
2024-09-26 11:04:55 +00:00
|
|
|
, enableOpx ? (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux)
|
2023-01-20 10:41:00 +00:00
|
|
|
, libuuid
|
|
|
|
, numactl
|
|
|
|
}:
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libfabric";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.22.0";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ofiwg";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-s6e9UMCYqSuAvVvlF+SuduCA5UC43QEahUA8apubnOk=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
buildInputs = lib.optionals enableOpx [ libuuid numactl ] ++ lib.optionals enablePsm2 [ libpsm2 ];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
configureFlags = [
|
|
|
|
(if enablePsm2 then "--enable-psm2=${libpsm2}" else "--disable-psm2")
|
|
|
|
(if enableOpx then "--enable-opx" else "--disable-opx")
|
|
|
|
];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://ofiwg.github.io/libfabric/";
|
|
|
|
description = "Open Fabric Interfaces";
|
|
|
|
license = with licenses; [ gpl2 bsd2 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.bzizou ];
|
|
|
|
};
|
|
|
|
}
|