nixpkgs/pkgs/os-specific/linux/nvidia-x11/persistenced.nix

38 lines
1.0 KiB
Nix
Raw Normal View History

nvidia_x11: sha256:
2019-04-23 20:46:45 +01:00
{ stdenv, fetchFromGitHub, m4 }:
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
2019-04-23 20:46:45 +01:00
pname = "nvidia-persistenced";
inherit (nvidia_x11) version;
2019-04-23 20:46:45 +01:00
src = fetchFromGitHub {
owner = "NVIDIA";
repo = "nvidia-persistenced";
rev = nvidia_x11.version;
inherit sha256;
};
nativeBuildInputs = [ m4 ];
installFlags = [ "PREFIX=$(out)" ];
postFixup = ''
# 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
patchelf --set-rpath "$(patchelf --print-rpath $out/bin/nvidia-persistenced):${nvidia_x11}/lib" \
$out/bin/nvidia-persistenced
'';
meta = with stdenv.lib; {
homepage = "https://www.nvidia.com/object/unix.html";
description = "Settings application for NVIDIA graphics cards";
license = licenses.unfreeRedistributable;
platforms = nvidia_x11.meta.platforms;
maintainers = with maintainers; [ abbradar ];
};
}