2017-01-29 21:29:39 +00:00
|
|
|
nvidia_x11: sha256:
|
|
|
|
|
2020-11-05 20:31:28 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, m4
|
|
|
|
, libtirpc
|
|
|
|
}:
|
2017-01-29 21:29:39 +00:00
|
|
|
|
2020-09-24 15:53:05 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-04-23 20:46:45 +01:00
|
|
|
pname = "nvidia-persistenced";
|
2020-09-24 15:53:05 +01:00
|
|
|
version = nvidia_x11.persistencedVersion;
|
2017-01-29 21:29:39 +00:00
|
|
|
|
2019-04-23 20:46:45 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NVIDIA";
|
|
|
|
repo = "nvidia-persistenced";
|
2020-09-24 15:53:05 +01:00
|
|
|
rev = nvidia_x11.persistencedVersion;
|
2017-01-29 21:29:39 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2020-10-18 19:24:31 +01:00
|
|
|
nativeBuildInputs = [ m4 ];
|
2020-11-05 20:31:28 +00:00
|
|
|
buildInputs = [ libtirpc ];
|
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
|
|
|
|
'';
|
|
|
|
|
2020-11-05 20:31:28 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
|
|
|
|
NIX_LDFLAGS = [ "-ltirpc" ];
|
|
|
|
|
2017-01-29 21:29:39 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01: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 14:40:15 +01:00
|
|
|
platforms = nvidia_x11.meta.platforms;
|
2017-01-29 21:29:39 +00:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|