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.
···4545 patches = [
4646 # Locations of nvidia driver libraries are not resolved via ldconfig which
4747 # doesn't get used on NixOS.
4848- # TODO: The latter doesn't really apply anymore.
4949- # Additional support binaries like nvidia-smi
5050- # are not resolved via the environment PATH but via the derivation output
5151- # path.
5252- (replaceVars ./fix-library-resolving.patch {
4848+ (replaceVars ./0001-ldcache-don-t-use-ldcache.patch {
5349 inherit (addDriverRunpath) driverLink;
5450 })
55515252+ # Use both PATH and the legacy nvidia-docker paths (NixOS artifacts)
5353+ # for binary lookups.
5454+ # TODO: Remove the legacy compatibility once nvidia-docker is removed
5555+ # from NixOS.
5656+ ./0002-nvc-nvidia-docker-compatible-binary-lookups.patch
5757+5658 # fix bogus struct declaration
5757- ./inline-c-struct.patch
5959+ ./0003-nvc-fix-struct-declaration.patch
5860 ];
59616062 postPatch = ''