2017-01-29 21:29:39 +00:00
|
|
|
nvidia_x11: sha256:
|
|
|
|
|
2020-11-05 20:31:28 +00:00
|
|
|
{ stdenv
|
2021-01-11 18:39:27 +00:00
|
|
|
, lib
|
2020-11-05 20:31:28 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, m4
|
|
|
|
, libtirpc
|
|
|
|
}:
|
2017-01-29 21:29:39 +00:00
|
|
|
|
2020-09-24 14:53:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-04-23 19:46:45 +00:00
|
|
|
pname = "nvidia-persistenced";
|
2020-09-24 14:53:05 +00:00
|
|
|
version = nvidia_x11.persistencedVersion;
|
2017-01-29 21:29:39 +00:00
|
|
|
|
2019-04-23 19:46:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NVIDIA";
|
|
|
|
repo = "nvidia-persistenced";
|
2020-09-24 14:53:05 +00:00
|
|
|
rev = nvidia_x11.persistencedVersion;
|
2017-01-29 21:29:39 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2020-10-18 18:24:31 +00:00
|
|
|
nativeBuildInputs = [ m4 ];
|
2020-11-05 20:31:28 +00:00
|
|
|
buildInputs = [ libtirpc ];
|
2017-01-29 21:29:39 +00:00
|
|
|
|
2021-08-30 23:30:55 +00:00
|
|
|
inherit (nvidia_x11) makeFlags;
|
|
|
|
|
2017-01-29 21:29:39 +00:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postFixup = ''
|
2019-02-27 08:44:05 +00:00
|
|
|
# Save a copy of persistenced for mounting in containers
|
|
|
|
mkdir $out/origBin
|
|
|
|
cp $out/{bin,origBin}/nvidia-persistenced
|
|
|
|
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 $out/origBin/nvidia-persistenced
|
|
|
|
|
2017-01-29 21:29:39 +00:00
|
|
|
patchelf --set-rpath "$(patchelf --print-rpath $out/bin/nvidia-persistenced):${nvidia_x11}/lib" \
|
|
|
|
$out/bin/nvidia-persistenced
|
|
|
|
'';
|
|
|
|
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
|
2020-11-05 20:31:28 +00:00
|
|
|
NIX_LDFLAGS = [ "-ltirpc" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.nvidia.com/object/unix.html";
|
2017-01-29 21:29:39 +00:00
|
|
|
description = "Settings application for NVIDIA graphics cards";
|
|
|
|
license = licenses.unfreeRedistributable;
|
2018-03-27 13:40:15 +00:00
|
|
|
platforms = nvidia_x11.meta.platforms;
|
2017-01-29 21:29:39 +00:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2023-12-20 02:45:17 +00:00
|
|
|
mainProgram = "nvidia-persistenced";
|
2017-01-29 21:29:39 +00:00
|
|
|
};
|
|
|
|
}
|