10 stdenv.mkDerivation rec {
11 pname = "nvidia-persistenced";
12 version = nvidia_x11.persistencedVersion;
14 src = fetchFromGitHub {
16 repo = "nvidia-persistenced";
17 rev = nvidia_x11.persistencedVersion;
21 nativeBuildInputs = [ m4 ];
22 buildInputs = [ libtirpc ];
24 inherit (nvidia_x11) makeFlags;
26 installFlags = [ "PREFIX=$(out)" ];
29 # Save a copy of persistenced for mounting in containers
31 cp $out/{bin,origBin}/nvidia-persistenced
32 patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 $out/origBin/nvidia-persistenced
34 patchelf --set-rpath "$(patchelf --print-rpath $out/bin/nvidia-persistenced):${nvidia_x11}/lib" \
35 $out/bin/nvidia-persistenced
38 env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
39 NIX_LDFLAGS = [ "-ltirpc" ];
42 homepage = "https://www.nvidia.com/object/unix.html";
43 description = "Settings application for NVIDIA graphics cards";
44 license = licenses.unfreeRedistributable;
45 platforms = nvidia_x11.meta.platforms;
46 maintainers = with maintainers; [ abbradar ];
47 mainProgram = "nvidia-persistenced";