3 { stdenv, lib, fetchurl, patchelf }:
6 sys = lib.concatStringsSep "-" (lib.reverseList (lib.splitString "-" stdenv.system));
7 bsys = builtins.replaceStrings ["_"] ["-"] sys;
8 fmver = nvidia_x11.version;
11 stdenv.mkDerivation rec {
12 pname = "fabricmanager";
15 url = "https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/" +
16 "${sys}/${pname}-${sys}-${fmver}-archive.tar.xz";
21 mkdir -p $out/{bin,share/nvidia-fabricmanager}
22 for bin in nv{-fabricmanager,switch-audit};do
23 ${patchelf}/bin/patchelf \
24 --set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \
25 --set-rpath ${lib.makeLibraryPath [ stdenv.cc.libc ]} \
29 mv bin/nv{-fabricmanager,switch-audit} $out/bin/.
30 for d in etc systemd share/nvidia;do
31 mv $d $out/share/nvidia-fabricmanager/.
33 for d in include lib;do
39 homepage = "https://www.nvidia.com/object/unix.html";
40 description = "Fabricmanager daemon for NVLink intialization and control";
41 license = lib.licenses.unfreeRedistributable;
42 platforms = nvidia_x11.meta.platforms;
43 mainProgram = "nv-fabricmanager";
44 maintainers = with lib.maintainers; [ edwtjo ];