This recreates the patches with `git format-patch` and adds descriptions to each of them. It also separates the binary and library lookup patches from each other.
···45 patches = [
46 # Locations of nvidia driver libraries are not resolved via ldconfig which
47 # doesn't get used on NixOS.
48- # TODO: The latter doesn't really apply anymore.
49- # Additional support binaries like nvidia-smi
50- # are not resolved via the environment PATH but via the derivation output
51- # path.
52- (replaceVars ./fix-library-resolving.patch {
53 inherit (addDriverRunpath) driverLink;
54 })
5500000056 # fix bogus struct declaration
57- ./inline-c-struct.patch
58 ];
5960 postPatch = ''
···45 patches = [
46 # Locations of nvidia driver libraries are not resolved via ldconfig which
47 # doesn't get used on NixOS.
48+ (replaceVars ./0001-ldcache-don-t-use-ldcache.patch {
000049 inherit (addDriverRunpath) driverLink;
50 })
5152+ # Use both PATH and the legacy nvidia-docker paths (NixOS artifacts)
53+ # for binary lookups.
54+ # TODO: Remove the legacy compatibility once nvidia-docker is removed
55+ # from NixOS.
56+ ./0002-nvc-nvidia-docker-compatible-binary-lookups.patch
57+58 # fix bogus struct declaration
59+ ./0003-nvc-fix-struct-declaration.patch
60 ];
6162 postPatch = ''