at 23.11-beta 48 lines 1.1 kB view raw
1{ lib, stdenv, fetchFromGitHub, numactl, pkg-config }: 2 3stdenv.mkDerivation rec { 4 pname = "libpsm2"; 5 version = "12.0.1"; 6 7 preConfigure= '' 8 export UDEVDIR=$out/etc/udev 9 substituteInPlace ./Makefile --replace "udevrulesdir}" "prefix}/etc/udev"; 10 ''; 11 12 enableParallelBuilding = true; 13 14 nativeBuildInputs = [ pkg-config ]; 15 buildInputs = [ numactl ]; 16 17 makeFlags = [ 18 # Disable blanket -Werror to avoid build failures 19 # on fresh toolchains like gcc-11. 20 "WERROR=" 21 ]; 22 23 installFlags = [ 24 "DESTDIR=$(out)" 25 "UDEVDIR=/etc/udev" 26 "LIBPSM2_COMPAT_CONF_DIR=/etc" 27 ]; 28 29 src = fetchFromGitHub { 30 owner = "intel"; 31 repo = "opa-psm2"; 32 rev = "PSM2_${version}"; 33 sha256 = "sha256-MzocxY+X2a5rJvTo+gFU0U10YzzazR1IxzgEporJyhI="; 34 }; 35 36 postInstall = '' 37 mv $out/usr/* $out 38 rmdir $out/usr 39 ''; 40 41 meta = with lib; { 42 homepage = "https://github.com/intel/opa-psm2"; 43 description = "The PSM2 library supports a number of fabric media and stacks"; 44 license = with licenses; [ gpl2 bsd3 ]; 45 platforms = [ "x86_64-linux" ]; 46 maintainers = [ maintainers.bzizou ]; 47 }; 48}