2023-09-11 14:37:26 +00:00
|
|
|
nvidia_x11: sha256:
|
|
|
|
|
|
|
|
{ stdenv, lib, fetchurl, patchelf }:
|
|
|
|
|
|
|
|
let
|
2024-08-16 21:08:03 +00:00
|
|
|
sys = lib.concatStringsSep "-" (lib.reverseList (lib.splitString "-" stdenv.system));
|
2023-09-11 14:37:26 +00:00
|
|
|
bsys = builtins.replaceStrings ["_"] ["-"] sys;
|
|
|
|
fmver = nvidia_x11.version;
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fabricmanager";
|
|
|
|
version = fmver;
|
|
|
|
src = fetchurl {
|
2023-12-15 11:20:42 +00:00
|
|
|
url = "https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/" +
|
2023-09-11 14:37:26 +00:00
|
|
|
"${sys}/${pname}-${sys}-${fmver}-archive.tar.xz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,share/nvidia-fabricmanager}
|
|
|
|
for bin in nv{-fabricmanager,switch-audit};do
|
|
|
|
${patchelf}/bin/patchelf \
|
|
|
|
--set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \
|
|
|
|
--set-rpath ${lib.makeLibraryPath [ stdenv.cc.libc ]} \
|
2024-02-22 13:54:03 +00:00
|
|
|
--shrink-rpath \
|
2023-09-11 14:37:26 +00:00
|
|
|
bin/$bin
|
|
|
|
done
|
|
|
|
mv bin/nv{-fabricmanager,switch-audit} $out/bin/.
|
|
|
|
for d in etc systemd share/nvidia;do
|
|
|
|
mv $d $out/share/nvidia-fabricmanager/.
|
|
|
|
done
|
|
|
|
for d in include lib;do
|
|
|
|
mv $d $out/.
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2024-08-16 21:08:03 +00:00
|
|
|
meta = {
|
2023-09-11 14:37:26 +00:00
|
|
|
homepage = "https://www.nvidia.com/object/unix.html";
|
|
|
|
description = "Fabricmanager daemon for NVLink intialization and control";
|
2024-08-16 21:08:03 +00:00
|
|
|
license = lib.licenses.unfreeRedistributable;
|
2023-09-11 14:37:26 +00:00
|
|
|
platforms = nvidia_x11.meta.platforms;
|
|
|
|
mainProgram = "nv-fabricmanager";
|
2024-08-16 21:08:03 +00:00
|
|
|
maintainers = with lib.maintainers; [ edwtjo ];
|
2023-09-11 14:37:26 +00:00
|
|
|
};
|
|
|
|
}
|